crustum / debug-bar
DebugBar plugin for CakePHP
Requires
- php: >=8.2
- cakephp/cakephp: ^5.4
- composer/composer: ^2.8
- doctrine/sql-formatter: ^1.1.3
Requires (Dev)
- cakedc/cakephp-phpstan: ^4.3
- cakephp/authentication: ^3.0|^4.0
- cakephp/authorization: ^3.0
- cakephp/cakephp-codesniffer: ^5.3
- crustum/cakephp-attribute-resolver: ^1.0
- crustum/mcp: ^1.0
- crustum/plugin-manifest: ^1.2
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^10.5 || ^11.1 || ^12.5 | ^13.0
- rector/rector: ^2.7
Suggests
- crustum/cakephp-attribute-resolver: Attributes inspection panel (optional)
- crustum/mcp: Local STDIO MCP server with bounded diagnostic tools
- crustum/plugin-manifest: CakePHP plugin installer
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-20 00:09:19 UTC
README
The DebugBar plugin provides a debugging toolbar and left-side inspector for CakePHP applications. It captures the current request into an SQLite store (requests + panels) and surfaces per-panel evidence — request data, SQL queries with slow/repeated/N+1 analysis, a merged timeline, findings, cache, logs, exceptions, events, models, views, HTTP client, mail, and more — through server-rendered fragments plus a bounded JSON API.
The shell is dependency-free (vanilla ES modules, no jQuery, no Livewire) with a request-switcher for recent requests, and read-only MCP tools let coding agents inspect the same captured data. Any plugin can add a panel with one DebugPanel subclass and one template element.
Warning: DebugBar is only intended for single-user local development environments. It captures configuration data, environment variables, and SQL bindings — keep it out of shared development environments, staging, or any place where that data must stay hidden.
Requirements
- PHP 8.2+
- SQLite (
pdo_sqlite) for the defaultdebug_barstore, or a dedicateddebug_bardatasource.
See Versions.md for the supported CakePHP versions.
Installation
Install the plugin with Composer from your
CakePHP project's ROOT directory (where the composer.json file is
located), keeping it in require-dev so production installs skip it:
composer require --dev crustum/debug-bar
Load the plugin:
bin/cake plugin load Crustum/DebugBar
If the toolbar does not appear, see
Troubleshooting — the usual causes are
a missing pdo_sqlite extension, a hostname outside
DebugBar.safeTld, and the Authorization plugin blocking toolbar
requests (DebugBar.ignoreAuthorization).
Documentation
For documentation, as well as tutorials, see the docs directory of this repository. To add your own inspector panel with zero JavaScript, see Custom Panels.
License
Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.