PHPackages                             yfix/yii2-debug-backported - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. yfix/yii2-debug-backported

ActiveYii-extension[Debugging &amp; Profiling](/categories/debugging)

yfix/yii2-debug-backported
==========================

Yii1 debug toolbar backported from Yii2

1.5.2(8y ago)011BSD-3-ClausePHPPHP &gt;=5.1.0

Since Sep 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/yfix/yii2-debug-backported)[ Packagist](https://packagist.org/packages/yfix/yii2-debug-backported)[ Docs](https://github.com/zhuravljov/yii2-debug)[ RSS](/packages/yfix-yii2-debug-backported/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

yii2-debug
==========

[](#yii2-debug)

Debug panel for Yii 1.1 (ported from Yii 2).

[![Latest Stable Version](https://camo.githubusercontent.com/a261fc4c6f6a3f9bafb45237ba8bd40bd24f2232f4991cafa0756b6a355c3291/68747470733a2f2f706f7365722e707567782e6f72672f7a68757261766c6a6f762f796969322d64656275672f76657273696f6e2e737667)](https://packagist.org/packages/zhuravljov/yii2-debug)[![Total Downloads](https://camo.githubusercontent.com/2c844e7cec9e78afb4e8c334f7a8776d38e32a63e682be4ef2f3eb3631c6ae9b/68747470733a2f2f706f7365722e707567782e6f72672f7a68757261766c6a6f762f796969322d64656275672f646f776e6c6f6164732e706e67)](https://packagist.org/packages/zhuravljov/yii2-debug)

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

[](#installation)

This extension is available at packagist.org and can be installed via composer by following command:

`composer require --dev zhuravljov/yii2-debug`.

If you want to install this extension manually just copy sources to `/protected/extensions` directory.

To enable toolbar in your application add following lines to config:

```
return array(
    'preload' => array(
        'debug',
    ),
    'components' => array(
        'debug' => array(
            'class' => 'vendor.zhuravljov.yii2-debug.Yii2Debug', // composer installation
            //'class' => 'ext.yii2-debug.Yii2Debug', // manual installation
        ),
        'db' => array(
            'enableProfiling' => true,
            'enableParamLogging' => true,
        ),
    ),
);
```

Configuration
-------------

[](#configuration)

You can customize debug panel behavior with this options:

- `enabled` - enable/disable debug panel.
- `allowedIPs` - list of IPs that are allowed to access debug toolbar. Default `array('127.0.0.1', '::1')`.
- `accessExpression` - additional php expression for access evaluation.
- `logPath` - directory storing the debugger data files. This can be specified using a path alias. Default `/runtime/debug`.
- `historySize` - maximum number of debug data files to keep. If there are more files generated, the oldest ones will be removed.
- `highlightCode` - highlight code. Highlight SQL queries and PHP variables. This parameter can be set for each panel individually.
- `moduleId ` - module ID for viewing stored debug logs. Default `debug`.
- `showConfig` - show brief application configuration page. Default `false`.
- `hiddenConfigOptions` - list of unsecure component options to hide (like login, passwords, secret keys). Default is to hide `username` and `password` of `db` component.
- `internalUrls` - use nice routes rules in debug module.
- `panels` - list of debug panels.

Each attached panel can be configured individually, for example:

```
'debug' => array(
    'class' => 'ext.yii2-debug.Yii2Debug',
    'panels' => array(
        'db' => array(
            // Disable code highlighting.
            'highlightCode' => false,
            // Disable substitution of placeholders with values in SQL queries.
            'insertParamValues' => false,
        ),
    ),
),
```

Each panel have callback option `filterData`. You can define custom function for filtering input data before writing it in to debug log. It's useful when you need to hide something secret or just delete data from logs. Be careful with data structure manipulation. It can lead to log parsing errors.

Example:

```
'debug' => array(
    'class' => 'ext.yii2-debug.Yii2Debug',
    'panels' => array(
        'db' => array(
            'filterData' => function($data){
                // Your code here
                return $data;
            }
        ),
    ),
),
```

Creating own panels
-------------------

[](#creating-own-panels)

To create own debug panel you can extend class `Yii2DebugPanel`, for example:

```
class MyTestPanel extends Yii2DebugPanel
{
    /**
     * The name of panel printed in debugger
     */
    public function getName()
    {
        return 'Name';
    }

    /**
     * Return summary html with results of execution in current request.
     * Data is available through $this->data
     */
    public function getSummary()
    {
        return '';
    }

    /**
     * Return detailed html report with results of execution in current request.
     * Data is available through $this->data
     */
    public function getDetail()
    {
        return '';
    }

    /**
     * Return data required for storing in logs.
     */
    public function save()
    {
        return array();
    }
}
```

And attach this panel in config:

```
'panels' => array(
    'test' => array(
        'class' => 'path.to.panel.MyTestPanel',
        // ...
    ),
),
```

Disable individual panels
-------------------------

[](#disable-individual-panels)

To disable an individual panel, either a core or custom panel, set the `enabled` property in the panel config to `false`.

Example: Disable core `profiling` panel

```
'panels' => array(
    'profiling' => array(
        'enabled' => false,
        // ...
    ),
),
```

Variables dumping
-----------------

[](#variables-dumping)

With static method `Yii2Debug::dump()` you can dump any data and examine it later in debug log.

Miscellaneous
-------------

[](#miscellaneous)

### Status Code

[](#status-code)

If you using PHP &lt; 5.4, debug panel can't detect redirects by himself. You can use following code as workaround:

```
'panels' => array(
    'request' => array(
        'filterData' => function($data){
            if (empty($data['statusCode'])) {
                if (isset($data['responseHeaders']['Location'])) {
                    $data['statusCode'] = 302;
                } else {
                    $data['statusCode'] = 200;
                }
            }
            return $data;
        },
    ),
),
```

Such code just set 302 code if `Location` header is present. Codes like 4xx and 5xx can be detected in debug panel by himself. In PHP 5.4 and higher debug panel uses native php function `http_response_code()` for detecting http response code, and there is no need to use this workaround.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 93.4% 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.

###  Release Activity

Cadence

Every ~167 days

Recently: every ~180 days

Total

10

Last Release

3107d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb543b5980194cefef7d287916329d0d12c9ef52595f56b670132a808674111e?d=identicon)[yfix](/maintainers/yfix)

---

Top Contributors

[![zhuravljov](https://avatars.githubusercontent.com/u/1656851?v=4)](https://github.com/zhuravljov "zhuravljov (99 commits)")[![devgen67](https://avatars.githubusercontent.com/u/2807102?v=4)](https://github.com/devgen67 "devgen67 (2 commits)")[![chuprik](https://avatars.githubusercontent.com/u/802946?v=4)](https://github.com/chuprik "chuprik (1 commits)")[![bashkarev](https://avatars.githubusercontent.com/u/3738201?v=4)](https://github.com/bashkarev "bashkarev (1 commits)")[![kikimor](https://avatars.githubusercontent.com/u/5276246?v=4)](https://github.com/kikimor "kikimor (1 commits)")[![yfix](https://avatars.githubusercontent.com/u/659419?v=4)](https://github.com/yfix "yfix (1 commits)")[![bkonetzny](https://avatars.githubusercontent.com/u/5451122?v=4)](https://github.com/bkonetzny "bkonetzny (1 commits)")

---

Tags

debugextensionyii

### Embed Badge

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

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

###  Alternatives

[zhuravljov/yii2-debug

Yii debug toolbar

144501.1k4](/packages/zhuravljov-yii2-debug)[mmucklo/krumo

KRUMO - version 2.0 of print\_r(); and var\_dump(); (with new updates)

89168.0k6](/packages/mmucklo-krumo)[georgringer/backend-debug

Some debug helper for the TYPO3 backend

2032.4k1](/packages/georgringer-backend-debug)

PHPackages © 2026

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