yiisoft/yii-debug


CA CE CIS DIT
    Yiisoft\Debug\Actions\DB\ExplainAction 1 5 2 2
    Yiisoft\Yii\Debug\Actions\DB\ExplainAction 1 5 2 2
    Yiisoft\Debug\Components\Search\Filter 8 1 2 2
    Yiisoft\Yii\Debug\Components\Search\Filter 8 1 2 2
    Yiisoft\Debug\Components\Search\Matchers\Base 0 0 2 2
    Yiisoft\Debug\Components\Search\Matchers\GreaterThan 1 0 1 3
    Yiisoft\Debug\Components\Search\Matchers\GreaterThanOrEqual 1 0 1 3
    Yiisoft\Debug\Components\Search\Matchers\LowerThan 1 0 1 3
    Yiisoft\Debug\Components\Search\Matchers\SameAs 1 1 2 3
    Yiisoft\Yii\Debug\Components\Search\Matchers\Base 0 0 2 2
    Yiisoft\Yii\Debug\Components\Search\Matchers\GreaterThan 1 0 1 3
    Yiisoft\Yii\Debug\Components\Search\Matchers\GreaterThanOrEqual 1 0 1 3
    Yiisoft\Yii\Debug\Components\Search\Matchers\LowerThan 1 0 1 3
    Yiisoft\Yii\Debug\Components\Search\Matchers\SameAs 1 1 2 3
    Yiisoft\Debug\Controllers\DefaultController 0 7 10 2
    Yiisoft\Debug\Controllers\UserController 1 5 3 2
    Yiisoft\Yii\Debug\Controllers\DefaultController 0 7 10 2
    Yiisoft\Yii\Debug\Controllers\UserController 1 5 3 2
    Yiisoft\Debug\DbAsset 0 0 2 2
    Yiisoft\Debug\DebugAsset 0 0 3 2
    Yiisoft\Debug\FlattenException 3 5 10 0
    Yiisoft\Debug\LogTarget 1 7 5 2
    Yiisoft\Debug\Module 4 19 28 2
    Yiisoft\Debug\Panel 12 7 19 2
    Yiisoft\Debug\ProfileTarget 1 0 2 2
    Yiisoft\Debug\TimelineAsset 0 0 4 2
    Yiisoft\Debug\UserswitchAsset 0 0 2 2
    Yiisoft\Yii\Debug\DbAsset 0 0 2 2
    Yiisoft\Yii\Debug\DebugAsset 0 0 3 2
    Yiisoft\Yii\Debug\FlattenException 3 5 10 0
    Yiisoft\Yii\Debug\LogTarget 1 7 5 2
    Yiisoft\Yii\Debug\Module 4 19 28 2
    Yiisoft\Yii\Debug\Panel 12 7 19 2
    Yiisoft\Yii\Debug\ProfileTarget 1 0 2 2
    Yiisoft\Yii\Debug\TimelineAsset 0 0 4 2
    Yiisoft\Yii\Debug\UserswitchAsset 0 0 2 2
    Yiisoft\Debug\Models\Router 1 1 8 2
    Yiisoft\Debug\Models\UserSwitch 2 2 9 2
    Yiisoft\Yii\Debug\Models\Router 1 1 8 2
    Yiisoft\Yii\Debug\Models\UserSwitch 2 2 9 2
    Yiisoft\Debug\Models\Search\Base 0 4 1 2
    Yiisoft\Debug\Models\Search\Db 1 3 5 3
    Yiisoft\Debug\Models\Search\Debug 1 3 13 3
    Yiisoft\Debug\Models\Search\Event 1 3 7 3
    Yiisoft\Debug\Models\Search\Log 2 3 6 3
    Yiisoft\Debug\Models\Search\Mail 1 3 13 3
    Yiisoft\Debug\Models\Search\Profile 1 3 5 3
    Yiisoft\Yii\Debug\Models\Search\Base 0 4 1 2
    Yiisoft\Yii\Debug\Models\Search\Db 1 3 5 3
    Yiisoft\Yii\Debug\Models\Search\Debug 1 3 13 3
    Yiisoft\Yii\Debug\Models\Search\Event 1 3 7 3
    Yiisoft\Yii\Debug\Models\Search\Log 2 3 6 3
    Yiisoft\Yii\Debug\Models\Search\Mail 1 3 13 3
    Yiisoft\Yii\Debug\Models\Search\Profile 1 3 5 3
    Yiisoft\Debug\Models\search\User 0 2 7 2
    Yiisoft\Yii\Debug\Models\search\User 0 2 7 2
    Yiisoft\Debug\Models\Timeline\DataProvider 1 1 8 2
    Yiisoft\Debug\Models\Timeline\Search 1 3 5 3
    Yiisoft\Debug\Models\Timeline\Svg 1 2 9 2
    Yiisoft\Yii\Debug\Models\Timeline\DataProvider 1 1 8 2
    Yiisoft\Yii\Debug\Models\Timeline\Search 1 3 5 3
    Yiisoft\Yii\Debug\Models\Timeline\Svg 1 2 9 2
    Yiisoft\Debug\Panels\AssetPanel 0 4 5 3
    Yiisoft\Debug\Panels\ConfigPanel 0 4 7 3
    Yiisoft\Debug\Panels\DbPanel 1 10 19 3
    Yiisoft\Debug\Panels\DumpPanel 0 5 8 3
    Yiisoft\Debug\Panels\EventPanel 0 6 6 3
    Yiisoft\Debug\Panels\LogPanel 0 7 5 3
    Yiisoft\Debug\Panels\MailPanel 0 14 7 3
    Yiisoft\Debug\Panels\ProfilingPanel 0 4 5 3
    Yiisoft\Debug\Panels\RequestPanel 0 7 6 3
    Yiisoft\Debug\Panels\RouterPanel 0 6 7 3
    Yiisoft\Debug\Panels\TimelinePanel 2 7 13 3
    Yiisoft\Debug\Panels\UserPanel 0 21 17 3
    Yiisoft\Yii\Debug\Panels\AssetPanel 0 4 5 3
    Yiisoft\Yii\Debug\Panels\ConfigPanel 0 4 7 3
    Yiisoft\Yii\Debug\Panels\DbPanel 1 10 19 3
    Yiisoft\Yii\Debug\Panels\DumpPanel 0 5 8 3
    Yiisoft\Yii\Debug\Panels\EventPanel 0 6 6 3
    Yiisoft\Yii\Debug\Panels\LogPanel 0 7 5 3
    Yiisoft\Yii\Debug\Panels\MailPanel 0 14 7 3
    Yiisoft\Yii\Debug\Panels\ProfilingPanel 0 4 5 3
    Yiisoft\Yii\Debug\Panels\RequestPanel 0 7 6 3
    Yiisoft\Yii\Debug\Panels\RouterPanel 0 6 7 3
    Yiisoft\Yii\Debug\Panels\TimelinePanel 2 7 13 3
    Yiisoft\Yii\Debug\Panels\UserPanel 0 21 17 3
CA (Afferent Coupling)
Number of unique incoming dependencies from other artifacts of the same type.
CE (Efferent Coupling)
Number of unique outgoing dependencies to other artifacts of the same type.
CID (Class Interface Size)
Number of non private methods and properties of a class: CIS = public(NOM + VARS)
Measures the size of the interface from other parts of the system to a class.
Depth of Inheritance Tree
Depth of inheritance to root class
{
    "name": "yiisoft/yii-debug",
    "type": "library",
    "description": "Yii Framework Debug Panel Extension",
    "keywords": ["yii", "debug", "debugger"],
    "license": "BSD-3-Clause",
    "support": {
        "source": "https://github.com/yiisoft/yii-debug",
        "issues": "https://github.com/yiisoft/yii-debug/issues",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii"
    },
    "authors": [
        {
            "name": "Qiang Xue",
            "email": "qiang.xue@gmail.com"
        }
    ],
    "minimum-stability": "dev",
    "prefer-stable": true,
    "require": {
        "yiisoft/yii-core": "^3.0@dev",
        "yiisoft/yii-dataview": "^3.0@dev",
        "yiisoft/arrays": "^3.0@dev",
        "yiisoft/strings": "^3.0@dev",
        "psr/log": "^1.1",
        "ext-mbstring": "*"
    },
    "require-dev": {
        "phpunit/phpunit": "^7.3",
        "yiisoft/yii-web": "^3.0@dev",
        "yiisoft/di": "^3.0@dev",
        "yiisoft/log": "^3.0@dev",
        "yiisoft/view": "^3.0@dev",
        "yiisoft/cache": "^3.0@dev",
        "hiqdev/composer-config-plugin": "^1.0@dev"
    },
    "autoload": {
        "psr-4": {
            "Yiisoft\\Yii\\Debug\\": "src"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Yiisoft\\Yii\\Debug\\Tests\\": "tests"
        }
    },
    "extra": {
        "branch-alias": {
            "dev-master": "3.0.x-dev"
        },
        "config-plugin": {
            "params": "config/params.php",
            "web": "config/web.php",
            "tests": "config/tests.php"
        }
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
}
yiisoft/yii-debug dependencies

Debug Extension for Yii


This extension provides a debugger for Yii framework 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.

Documentation is at docs/guide/README.md.

Latest Stable Version Total Downloads Build Status

Installation

The preferred way to install this extension is through composer.

composer require --prefer-dist yiisoft/yii-debug

Usage

Once the extension is installed, simply modify your application configuration as follows:

return [
    'bootstrap' => ['debug'],
    'modules' => [
        'debug' => [
            '__class' => Yiisoft\Yii\Debug\Module::class,
            // uncomment and adjust the following to add your IP if you are not connecting from localhost.
            //'allowedIPs' => ['127.0.0.1', '::1'],
        ],
        // ...
    ],
    ...
];

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.

Open Files in IDE

You can create a link to open files in your favorite IDE with this configuration:

return [
    'bootstrap' => ['debug'],
    'modules' => [
        'debug' => [
            '__class' => Yiisoft\Yii\Debug\Module::class,
            'traceLine' => '<a href="phpstorm://open?url={file}&line={line}">{file}:{line}</a>',
            // uncomment and adjust the following to add your IP if you are not connecting from localhost.
            //'allowedIPs' => ['127.0.0.1', '::1'],
        ],
        // ...
    ],
    ...
];

You must make some changes to your OS. See these examples:

  • PHPStorm: https://github.com/aik099/PhpStormProtocol
  • Sublime Text 3 on Windows or Linux: https://packagecontrol.io/packages/subl%20protocol
  • Sublime Text 3 on Mac: https://github.com/inopinatus/sublime_url

Virtualized or dockerized

If your application is run under a virtualized or dockerized environment, it is often the case that the application's base path is different inside of the virtual machine or container than on your host machine. For the links work in those situations, you can configure traceLine like this (change the path to your app):

'traceLine' => function($options, $panel) {
    $filePath = str_replace($this->app->basePath, '~/path/to/your/app', $options['file']);
    return strtr('<a href="ide://open?url=file://{file}&line={line}">{text}</a>', ['{file}' => $filePath]);
},