siteone / craft-tracy
Tracy plugin for Craft CMS 4
Installs: 96
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- php: ^8.0.2
- craftcms/cms: ^4.0.0
- tracy/tracy: 2.9.7
This package is not auto-updated.
Last update: 2025-01-03 05:37:24 UTC
README
Plugin integrates awesome nette/tracy debugging tool into Craft CMS. See Tracy in action here.
Requirements
- PHP 8.0.2+
- Craft CMS 4.0+
Installation
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.
Usage
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.
Settings
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 resources
Official Tracy resources can be found here: