What will happen if I will turn on debug mode on Yii2 deployed in AWS?

Hi, can someone tell me what will happen and if its not advisable to turn on debug mode on Yii2 deployed in AWS?

I have a developer and I suggested to turn on the debug mode so we would know the cause of error on our deployed web app. The error logs aren’t helping though.

The errors are taking quite a time now and our developer doesn’t want to turn on the debug mode for some reasons I dont know of. Can anyone please advise?

exposing your logs or debug details out to the public could be a potential security problem, someone could use that information and hack your system.

I think you could modify the configuration of ‘log’ component to gather more fine-grained information without turning on the debug mode:




        'log' => [

            // 'traceLevel' => YII_DEBUG ? 3 : 0,

            'traceLevel' => 3,

            'targets' => [

                [

                    'class' => 'yii\log\FileTarget',

                    // 'levels' => ['error', 'warning'],

                    'levels' => ['error', 'warning', 'info', 'trace'],

                ],

                ...

            ],

        ],



Our web app is not yet accessible to public but we’ve made it online so we know if its displaying and functioning well.

Thank you. I will definitely suggest this.

also keep in mind debugging might add overhead to your app and might slow it down if you have lot of traffic, best bet is to tune the log level as suggested by softark.