PHPackages                             yii2-extensions/debug - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. yii2-extensions/debug

ActiveYii2-extension[Logging &amp; Monitoring](/categories/logging)

yii2-extensions/debug
=====================

The debugger extension for the Yii framework

24.3k[1 PRs](https://github.com/yii2-extensions/debug/pulls)PHP

Since Feb 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yii2-extensions/debug)[ Packagist](https://packagist.org/packages/yii2-extensions/debug)[ RSS](/packages/yii2-extensions-debug/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

 [ ![](https://camo.githubusercontent.com/cc75562bca6e54e98046e4fb187ef8d96c997a8f31c6f4d2f6ed0c816413b47a/68747470733a2f2f7777772e7969696672616d65776f726b2e636f6d2f696d6167652f7969695f6c6f676f5f6c696768742e737667) ](https://github.com/yii2-extensions/debug)

Debug
=====

[](#debug)

 [ ![php-version](https://camo.githubusercontent.com/cfe9179013aaeb962182231f5cc56946d96d3c7356e64008b58bad1025cfb1e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e312d373837434235) ](https://www.php.net/releases/8.1/en.php) [ ![yii2-version](https://camo.githubusercontent.com/f946cb5d9010fb3cc3f9d9530b51fee224bdbabe1345dd3f090dfbca82446217/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5969693225323076657273696f6e2d322e322d626c7565) ](https://github.com/yiisoft/yii2/tree/2.2) [ ![PHPUnit](https://github.com/yii2-extensions/debug/actions/workflows/build.yml/badge.svg) ](https://github.com/yii2-extensions/debug/actions/workflows/build.yml) [ ![Compatibility](https://github.com/yii2-extensions/debug/actions/workflows/compatibility.yml/badge.svg) ](https://github.com/yii2-extensions/debug/actions/workflows/compatibility.yml) [ ![Codecov](https://camo.githubusercontent.com/47c0041c6d1c6ae73adef81957980d8c1cca567ba935c82abdd960a37c3cc30c/68747470733a2f2f636f6465636f762e696f2f67682f796969322d657874656e73696f6e732f64656275672f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4d4630585547564c5943) ](https://codecov.io/gh/yii2-extensions/debug)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

```
php composer.phar require --dev --prefer-dist yii2-extensions/debug

```

or add

```
"yii2-extensions/debug": "dev-main"

```

to the require-dev section of your `composer.json` file.

Usage
-----

[](#usage)

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

```
return [
    'bootstrap' => ['debug'],
    'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
            // 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

[](#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' => 'yii\debug\Module',
            'traceLine' => '{file}:{line}',
            // 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:
- Sublime Text 3 on Windows or Linux:
- Sublime Text 3 on Mac: [https://github.com/inopinatus/sublime\_url](https://github.com/inopinatus/sublime_url)

### Virtualized or dockerized

[](#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 `tracePathMappings` like this (change the path to your app):

```
'tracePathMappings' => [
    '/app' => '/path/to/your/app',
],
```

Or you can create a callback for `traceLine` for even more control:

```
'traceLine' => function($options, $panel) {
    $filePath = $options['file'];
    if (StringHelper::startsWith($filePath, Yii::$app->basePath)) {
        $filePath = '/path/to/your/app' . substr($filePath, strlen(Yii::$app->basePath));
    }
    return strtr('{text}', ['{file}' => $filePath]);
},
```

### Configure with yiisoft/config

[](#configure-with-yiisoftconfig)

> Add the following code to your `config/config-plugin` file in your application.

```
'config-plugin' => [
    'web' => [
        '$yii2-debug', // add this line
        'web/*.php'
    ],
],
```

> For activate the debug toolbar, add in your config/params.php file in your application.

```
return [
    'yii2.debug' => true,
];
```

> For change allowed IPs, add in your config/params.php file in your application.

```
return [
    'yii2.debug.allowedIPs' => ['192.168.1.1'],
];
```

> For class map module, add in your config/params.php file in your application.

```
use App\YourClass;

return [
    'yii2.debug.classMap' => [
        'class' => YourClass::class,
    ],
];
```

Testing
-------

[](#testing)

[Check the documentation testing](/docs/testing.md) to learn about testing.

Support versions Yii2
---------------------

[](#support-versions-yii2)

[![Yii20](https://camo.githubusercontent.com/eb75eedd3cbc9159c862871d7ba5a079f2d8843e186c4365f72e55b402076f4b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5969693225323076657273696f6e2d322e302d626c7565)](https://github.com/yiisoft/yii2/tree/2.0.49.3)[![Yii22](https://camo.githubusercontent.com/f946cb5d9010fb3cc3f9d9530b51fee224bdbabe1345dd3f090dfbca82446217/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5969693225323076657273696f6e2d322e322d626c7565)](https://github.com/yiisoft/yii2/tree/2.2)

Quality code
------------

[](#quality-code)

[![static-analysis](https://github.com/yii2-extensions/debug/actions/workflows/static.yml/badge.svg)](https://github.com/yii2-extensions/debug/actions/workflows/static.yml)[![phpstan-level](https://camo.githubusercontent.com/8773bd6edfd3a5ff9d805bd8e97a46ab23aa9ba946680b5bdf3d63aa24578331/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2532306c6576656c2d312d626c7565)](https://github.com/yii2-extensions/debug/actions/workflows/static.yml)[![StyleCI](https://camo.githubusercontent.com/f38b0510532839673ce00735a3db1fbd4570372014600b02ddec3dd7c707e3f3/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3639393834323432332f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/699842423?branch=main)

Our social networks
-------------------

[](#our-social-networks)

[![Twitter](https://camo.githubusercontent.com/d077c362ac639792171af8bc002ee827816733dfc0925f70b557e6d151022226/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d666f6c6c6f772d3144413146323f6c6f676f3d74776974746572266c6f676f436f6c6f723d314441314632266c6162656c436f6c6f723d3535353535353f7374796c653d666c6174)](https://twitter.com/Terabytesoftw)

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/524d2b46690f41fce7188d369488a35e7624e6c5a264d82aacd08548bfd156ab?d=identicon)[terabytesoftw](/maintainers/terabytesoftw)

---

Top Contributors

[![terabytesoftw](https://avatars.githubusercontent.com/u/42547589?v=4)](https://github.com/terabytesoftw "terabytesoftw (21 commits)")

### Embed Badge

![Health badge](/badges/yii2-extensions-debug/health.svg)

```
[![Health](https://phpackages.com/badges/yii2-extensions-debug/health.svg)](https://phpackages.com/packages/yii2-extensions-debug)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
