The TutsPlus.com site continues their "Programming with Yii2" series of tutorials with the latest edition in the series, a look at using the Yii2 debugger to help track down issues in your code.
In today's tutorial, I'll show you how to install the Yii2 Debugger, and we'll explore its capabilities in detail. It's a powerful programming assistant which is often underutilized.
As you code and test your application, the debugger can show you your application path, queries and query variables, performance characteristics, server and framework settings, and much more.
The article starts off by showing you how to install the "yiisoft/yii2-debug" library (via Composer) and enable it in the "debug" section of your configuration. With it correctly installed you'll then be able to access it at the bottom of your pages. The debug console provides plenty of helpful information related to:
- the route matched
- a log of actions and events
- load time
- memory used
- database queries performed
...among others. The tutorial walks you through these and other pieces of information the tool provides with screenshots of example output for each.