DebugKit
DebugKit provides a debugging toolbar and enhanced debugging tools for CakePHP applications. It lets you quickly inspect configuration data, log messages, SQL queries, timers, mail previews, request history, and more while developing locally.
WARNING
DebugKit is only intended for use in single-user local development environments. Avoid using DebugKit in shared development, staging, or production-like environments where configuration and environment data must remain private.
Requirements
DebugKit stores panel data in a database. The default setup uses SQLite through pdo_sqlite. If SQLite is not available, define a dedicated debug_kit datasource instead.
Installation
Install the plugin with Composer from your application's root directory:
php composer.phar require --dev cakephp/debug_kit:"^5.0"Then load the plugin in debug mode:
bin/cake plugin load DebugKit --only-debugTroubleshooting
If the toolbar icon does not appear in the bottom-right corner of the page, check these common issues:
- SQLite is not installed, and DebugKit cannot persist panel data.
- Your hostname is not recognized as a safe development host. Add the TLD to
DebugKit.safeTld. - You are using the Authorization plugin and need to set
DebugKit.ignoreAuthorizationtotrue.
Documentation Map
The English documentation is split into focused sections:
- Configuration covers the available settings and database storage.
- Toolbar Usage introduces the built-in panels.
- History Panel explains request history and replaying prior requests.
- Mail Panel shows mail capture and preview support.
- Custom Panels explains how to build your own panels.
- API Requests covers toolbar access for API-only applications.
- Helper Functions documents the SQL helpers, timers, and query tracing.