YII logging for debugging

前端 未结 3 1456
无人共我
无人共我 2021-02-09 08:00

In many cases, Xdebug is not suitable for debugging as it involves clicks to run to a particular line of codes. I want to use something that is similar to cak

3条回答
  •  轮回少年
    2021-02-09 08:32

    You should add following lines to your protected/main.php file for debug:true mode. Trust work like a charm !

    return array(
        'preload' => array(
            'debug',
        ),
        'components' => array(
            'debug' => array(
                'class' => 'ext.yii2-debug.Yii2Debug',
    
    
             ),
                'db' => array(
                    'enableProfiling' => true,
                    'enableParamLogging' => true,
                ),
            ),
        );
    

提交回复
热议问题