Plugin integrates awesome nette/tracy debugging tool into Craft CMS. See Tracy in action here.
- PHP 8.0.2+
- Craft CMS 4.0+
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require siteone/craft-tracy
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Tracy.
In addition to the standard dump($var)
, dumpe($var)
, bdump($var)
functions in PHP, the plugin provides the following functions in templates:
{{ dump(entity) }} or {{ d(entity) }} - Dump variable in place.
{{ dumpe(entity) }} or {{ dd(entity) }} - Dump variable in place and exit.
{{ bdump(entity) }} or {{ bd(entity) }} - Dump variable to debug bar.
Some settings can be changed. Just create a config/tracy.php
file, insert the following code (defaults) and change the values as needed:
<?php
return [
// Maximum string length
'maxLength' => 150,
// How deep will list
'maxDepth' => 4,
// Hide values of these keys
'keysToHide' => [],
// Visual theme (light, dark)
'dumpTheme' => 'light',
// Display the location where dump() was called?
'showLocation' => false,
];
Official Tracy resources can be found here: