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

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

phuongdev89/yii2-debug
======================

Yii2 Debug

0113PHP

Since Mar 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/phuongdev89/yii2-debug)[ Packagist](https://packagist.org/packages/phuongdev89/yii2-debug)[ RSS](/packages/phuongdev89-yii2-debug/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Installation
============

[](#installation)

Dependent
---------

[](#dependent)

Must have [phpstorm-protocol](https://github.com/phuongdev89/phpstorm-protocol) before

Composer
--------

[](#composer)

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

Either run

```
php composer.phar require --prefer-dist phuongdev89/yii2-debug "@dev"

```

or add

```
"phuongdev89/yii2-debug": "@dev"

```

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

Configuration
=============

[](#configuration)

```
'modules' => [
    'debug' => [
        'class' => 'phuongdev89\debug\Module',
    ],
],

```

or

```
$config['bootstrap'][]      = 'debug';
$config['modules']['debug'] = [
    'class' => 'phuongdev89\debug\Module',
];

```

Backtrace Usage
===============

[](#backtrace-usage)

Use to see traces of given Object

### Initialize the backtrace with an existed active record.

[](#initialize-the-backtrace-with-an-existed-active-record)

Example:

```
if($model->save()) {
   Backtrace::init($model);
}

```

### Save traces to file with json formatted

[](#save-traces-to-file-with-json-formatted)

Example:

```
$model = new Model;
$model->id = 1;
$model->username = 'test';
if($model->save()) {
  Backtrace::init($model)->toFile('@runtime/test.json');
  //Output is /runtime/test.json
}

```

### Return json format

[](#return-json-format)

Example:

```
if($model->save()) {
 $traceJson = Backtrace::init($model)->toJson();
}

```

output:

```
[
    {
        "function": "actionUpdate",
        "class": "backend\\controllers\\UserController",
        "type": "->"
    },
    {
        "file": "backend/controllers/UserController.php",
        "line": 366,
        "function": "save",
        "class": "common\\models\\User",
        "type": "->"
    },
    {
        "file": "/var/www/tribe/common/models/User.php",
        "line": 289,
        "function": "toJson",
        "class": "phuongdev89\\debug\\db\\Backtrace",
        "type": "::"
    }
]

```

### Return php array format

[](#return-php-array-format)

Example:

```
if($model->save()) {
 $traceJson = Backtrace::init($model)->toArray();
}

```

Output:

```
[
    [
        "function" => "actionUpdate",
        "class" => "backend\\controllers\\UserController",
        "type" => "->"
    ],
    [
        "file" => "backend/controllers/UserController.php",
        "line" => 366,
        "function" => "save",
        "class" => "common\\models\\User",
        "type" => "->"
    ],
    [
        "file" => "/var/www/tribe/common/models/User.php",
        "line" => 289,
        "function" => "toJson",
        "class" => "phuongdev89\\debug\\db\\Backtrace",
        "type" => "::"
    ]
]

```

### Automated update the given column with json data

[](#automated-update-the-given-column-with-json-data)

Example:

```
if($model->save()) {
 Backtrace::init($model)->toAttribute('trace');
}

```

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

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/b606411df0cf562fe1d77d5ee80c3ef2e2c34a06d93470a4127c8910132ba258?d=identicon)[phuongdev89](/maintainers/phuongdev89)

---

Top Contributors

[![phuongdev89](https://avatars.githubusercontent.com/u/7648033?v=4)](https://github.com/phuongdev89 "phuongdev89 (1 commits)")

### Embed Badge

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

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

###  Alternatives

[fjogeleit/prometheus-messenger-middleware

Prometheus Middleware for the Symfony Messenger Component

2255.2k](/packages/fjogeleit-prometheus-messenger-middleware)[georgringer/backend-debug

Some debug helper for the TYPO3 backend

2032.4k1](/packages/georgringer-backend-debug)[spatie/craft-ray

Easily debug CraftCMS projects

1638.4k](/packages/spatie-craft-ray)

PHPackages © 2026

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