https://blog.csdn.net/verifocus/article/details/79192118?utm_source=blogxgwz4
debug调试器,是简单的bug收集工具,在调试问题的时候非常有用。
但是当上线了之后,有两种方法来进行调试
1、制定特定的ip
在allowedIPs中加入当前网络的ip,这样就可以只有当前网络可见了,这是最常用也是最好的调试方式
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
// uncomment the following to add your IP if you are not connecting from localhost.
'allowedIPs' => ['127.0.0.1', '::1'],
];
2、只允许特定页面进行显示
(1)首先页面要开启debug
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
// uncomment th