Yii2 Debug

Debugger toolbar and profiling pages for Yii Framework 2 applications.

Tool
Composer
v2.1.28
203stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
65/100Good
Development Activity60
Maintenance36
Community84
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture82
Code Quality80
Innovation80
Learning Curve78

yii2-debug is the official debug extension for the Yii Framework 2.0. Once installed and enabled, it renders a debugger toolbar at the bottom of every page and exposes a set of standalone pages that break down each request in detail.

The extension collects data through pluggable panels covering routing, request/response, logs, database queries, timeline profiling, mail, user switching, and more, giving developers deep visibility into what an application does on each request without leaving the browser.

What You Get

  • A debugger toolbar rendered at the bottom of every page during development
  • Standalone debug pages with detailed per-request breakdowns
  • A panel system covering logs, database queries, timeline, mail, and request data
  • IDE deep-link support to open files at a specific line
  • Path-mapping options for dockerized and virtualized environments

Common Use Cases

  • Inspecting database queries and their execution time during development
  • Profiling request timelines to find performance bottlenecks
  • Reviewing application logs and dumped variables per request
  • Debugging routing, request, and response data in Yii 2 apps

Under The Hood

Architecture - yii2-debug is a Yii 2 extension registered as a bootstrapped module (yii\debug\Module in src/Module.php). It hooks the application lifecycle, and each concern is implemented as a Panel subclass under src/panels/ (log, db, timeline, request, mail, router, user-switch, etc.). Panels collect data during the request, a LogTarget persists a serialized debug data file per request, and controllers/views under src/controllers and src/views render both the injected toolbar and the standalone debug pages. Tech Stack - Pure PHP (targeting PHP 7.4+, best on PHP 8) built on top of yiisoft/yii2 ~2.0.54, using PSR-4 autoloading (yii\debug\ maps to src). Front-end assets (SCSS and JavaScript for the toolbar/timeline) ship via Yii asset bundles such as DebugAsset and TimelineAsset. Code Quality - The project is actively linted and statically analyzed: it ships phpcs.xml.dist, phpstan.neon with a baseline, and a PHPUnit suite under tests/, wired through a Makefile and CI workflows. It follows Yii coding standards and is a mature, long-lived codebase (5000+ commits). API Design - Integration is declarative: add debug to the app’s bootstrap array and configure the debug module, optionally setting allowedIPs, traceLine, or tracePathMappings. There is little boilerplate, and the panel system is extensible for custom debug data.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search