Recently, the Yii 2 development team has pleased the community with a native debugging panel. An important feature of this debugger is that it writes a story and makes it possible to investigate debugging information from each request to the yii project. This makes it easy and enjoyable to debug ajax requests, pages with redirects, render graphics and so on.
The appearance and use of one of the earlier versions of the debugger in Yii 2 can be seen in the video by Alexander Makarov ( SamDark ): ')
Inspired by this wonderful tool, I decided to port it to Yii 1.1. The code which as a result turned out, it is possible to look at github .
Appearance debugger (in pictures)
Minimized panel with summary information on the page of the yii-project. All blocks on the panel are clickable, links lead to pages for detailed viewing of debug data.
Configuration page.
Drop-down list with links to the last 10 requests.
Page "Request".
Page "Logs".
The "Database" page with a list of sql queries and information on connections to the database.
Story.
Installation and Setup
To install a debugger in your project, you need to download the source code and add the project config with the necessary minimum of settings:
The following properties are available for more fine-tuning the Yii2Debug component:
enabled - enable / disable debugger.
allowedIPs - ip list that is allowed to access debugger.
logPath - the path to write logs.
historySize - maximum number of logs recorded. Earlier logs will be deleted.
highlightCode - code highlighting. Highlighted sql queries and php-data arrays.
panels - an array of panels connected to the debugger.
moduleId - ID of the module for viewing previously saved data.
In conclusion, I would like to add that the debugger can be supplemented with its own panels with debugging data. For each such panel, you need to: develop your class inheriting it from Yii2DebugPanel, and add it to the panels array of the Yii2Debug component.
Thanks for attention. I hope this extension will make your work with Yii even more comfortable. I would be grateful for bug reports and sensible ideas. Special thanks to the Yii development team for their work and their bright minds.