PHPackages                             yii2-showsql/showsql - 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. yii2-showsql/showsql

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

yii2-showsql/showsql
====================

yii2框架sql调试展示。

00PHP

Since Aug 27Pushed 6y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

\##安装

```

composer require yii2-showsql/showsql

或者在composer.json中加入

 "require": {

        "yii2-showsql": "dev-master"
}

```

更新依赖 `composer update`

\##使用说明

\##DEMO

```

'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
                [
                    //日志记录方式 加入这段配置
                    'class' => 'easy\debug\utils\LogTarget',
                    'levels' => ['info','error', 'warning'],//日志等级
                    'logVars' =>['_GET', '_POST', '_FILES', '_COOKIE', '_SESSION','_SERVER'],//被收集记录的额外数据如 'logVars' => ['_GET', '_POST', '_FILES', '_COOKIE', '_SESSION','_SERVER'],
                    //指定日志目录
                    'logFile' => '@app/runtime/logs/info.log',
                ],
            ],
        ],

if (YII_DEBUG) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'easy\debug\ViewInit',
        #'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
    ];
}

```

\##效果图 [![image](https://github.com/gaoxuxu123/easy-debug/raw/master/assets/img/1.png)](https://github.com/gaoxuxu123/easy-debug/blob/master/assets/img/1.png)[![image](https://github.com/gaoxuxu123/easy-debug/raw/master/assets/img/2.png)](https://github.com/gaoxuxu123/easy-debug/blob/master/assets/img/2.png)[![image](https://github.com/gaoxuxu123/easy-debug/raw/master/assets/img/3.png)](https://github.com/gaoxuxu123/easy-debug/blob/master/assets/img/3.png)

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

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://avatars.githubusercontent.com/u/11934791?v=4)[moxiaoxuancc](/maintainers/gaoxuxu123)[@gaoxuxu123](https://github.com/gaoxuxu123)

---

Top Contributors

[![gaoxuxu123](https://avatars.githubusercontent.com/u/11934791?v=4)](https://github.com/gaoxuxu123 "gaoxuxu123 (7 commits)")

### Embed Badge

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

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

###  Alternatives

[fjogeleit/prometheus-messenger-middleware

Prometheus Middleware for the Symfony Messenger Component

2255.2k](/packages/fjogeleit-prometheus-messenger-middleware)[spatie/craft-ray

Easily debug CraftCMS projects

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

PHPackages © 2026

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