Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
/ craft-debug Public archive

🐞 A simple Craft module to debug Twig within your browser

License

Notifications You must be signed in to change notification settings

trendyminds/craft-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐞 Debug

A simple Craft module, inspired by Mildly Geeky's "Kint", to debug Twig within your browser

Usage

{# Send the contents of `var` to a console.log() #}
{{ debug(var) }}

{# Send the contents of `var` to a console.table() #}
{{ debug(var, { view: 'table' }) }}

{# Send the contents of `var` to Symfony's VarDumper #}
{{ dump(var) }}

{# Send the contents of `var` to Symfony's VarDumper and exit #}
{{ dd(var) }}

NOTE: If devMode is disabled the debug statement will not be processed.

Installation

  1. Download a zip archive, rename folder to debug and add it to your modules/ folder.
  2. Add the contents of the app.php file to your config/app.php (or just copy it there if it does not exist)
return [
	'modules' => [
		'debug' => \modules\debug\Debug::class,
	],
	'bootstrap' => [
		'debug',
	],
];
  1. Add the following to your project's composer.json file so that Composer can find your module:
"autoload": {
  "psr-4": {
    "modules\\debug\\": "modules/debug/"
  }
},
  1. Run the following in your command line
composer dump-autoload

About

🐞 A simple Craft module to debug Twig within your browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages