Debug Extension for Yii 2 ¶
This extension provides a debugger for Yii framework 2.0 applications. When this extension is used, a debugger toolbar will appear at the bottom of every page. The extension also provides a set of standalone pages to display more detailed debug information.
For license information check the LICENSE-file.
Installation ¶
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yiisoft/yii2-debug
or add
"yiisoft/yii2-debug": "~2.0.0"
to the require section of your composer.json
file.
Usage ¶
Once the extension is installed, simply modify your application configuration as follows:
return [
'bootstrap' => ['debug'],
'modules' => [
'debug' => 'yii\debug\Module',
// ...
],
...
];
You will see a debugger toolbar showing at the bottom of every page of your application. You can click on the toolbar to see more detailed debug information.
Class Reference
Class | Description |
---|---|
yii\debug\DebugAsset | Debugger asset bundle |
yii\debug\LogTarget | The debug LogTarget is used to store logs for later use in the debugger tool |
yii\debug\Module | The Yii Debug Module provides the debug toolbar and debugger |
yii\debug\Panel | Panel is a base class for debugger panel classes. It defines how data should be collected, what should be displayed at debug toolbar and on debugger details view. |
yii\debug\components\search\Filter | Provides array filtering capabilities. |
yii\debug\components\search\matchers\Base | Base class for matchers that are used in a filter. |
yii\debug\components\search\matchers\GreaterThan | Checks if the given value is greater than the base one. |
yii\debug\components\search\matchers\LowerThan | Checks if the given value is lower than the base one. |
yii\debug\components\search\matchers\MatcherInterface | MatcherInterface should be implemented by all matchers that are used in a filter. |
yii\debug\components\search\matchers\SameAs | Checks if the given value is exactly or partially same as the base one. |
yii\debug\controllers\DefaultController | Debugger controller |
yii\debug\models\search\Base | Base search model |
yii\debug\models\search\Db | Search model for current request database queries. |
yii\debug\models\search\Debug | Search model for requests manifest data. |
yii\debug\models\search\Log | Search model for current request log. |
yii\debug\models\search\Mail | Mail represents the model behind the search form about current send emails. |
yii\debug\models\search\Profile | Search model for current request profiling log. |
yii\debug\panels\AssetPanel | Debugger panel that collects and displays asset bundles data. |
yii\debug\panels\ConfigPanel | Debugger panel that collects and displays application configuration and environment. |
yii\debug\panels\DbPanel | Debugger panel that collects and displays database queries performed. |
yii\debug\panels\LogPanel | Debugger panel that collects and displays logs. |
yii\debug\panels\MailPanel | Debugger panel that collects and displays the generated emails. |
yii\debug\panels\ProfilingPanel | Debugger panel that collects and displays performance profiling info. |
yii\debug\panels\RequestPanel | Debugger panel that collects and displays request data. |