Yii2 Debugbar 不显示文件行

Yii2 Debugbar is not showing the file line

我正尝试在 Yii2 调试栏上查看 traceLine,如 (https://github.com/yiisoft/yii2-debug#open-files-in-ide) 中所述,但我看不到它。
我有 Yii2 2.0.28 和 debug-bar 2.1.9 php 7.2.19
例如:有没有什么办法,检查任何调试栏的面板,知道我的代码的哪一行在调试栏中引发了 trace/profile 操作?
或者我如何才能看到我在数据库面板中看到的任何查询的位置?

我的配置:

$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
    'class' => 'yii\debug\Module',
    'traceLine' => '<a href="phpstorm://open?url={file}&line={line}">{file}:{line}</a>',
    'allowedIPs' => ['*'],
    'panels' => [
        'db' => [
            'class' => 'yii\debug\panels\DbPanel',
            'defaultOrder' => [
                'seq' => SORT_ASC
            ],
            'defaultFilter' => [
                'type' => 'SELECT'
            ]
        ],
    ],
];

配置中有两个属性会影响文件在调试栏中的日志中的显示方式。

1) traceLine 属性 调试模块。此 属性 包含一个用于显示单行跟踪的模板。 在配置中它可能看起来像这样

$config['modules']['debug'] = [
    'class' => 'yii\debug\Module',
    'traceLine' => '<a href="phpstorm://open?url={file}&line={line}">{file}:{line}</a>',
    // ... other debug module configurations
]

2) traceLevel 属性 日志组件。这会影响将在跟踪中显示的呼叫数。调试工具栏中不显示框架 类 的调用,只显示您的文件。 配置可能如下所示

'components' => [
    'log' => [
        'traceLevel' => YII_DEBUG ? 3 : 0,
        // ... other log component configurations
    ],
    // ... other components
],

在示例中,traceLevel 取决于 YII_DEBUG 常量。这用于避免生产环境中的性能问题。这也是在默认的 yii2 应用程序模板中设置 traceLevel 的方式。

YII_DEBUG常量通常在index.php文件中这样设置

defined('YII_DEBUG') or define('YII_DEBUG', true);