thinkphp6 turns on Trace debugging mode

Edit the composer.json file:

Add in require-dev: "topthink/think-trace":"^1.0"

    "require-dev": {
        "symfony/var-dumper": "^4.2",
        "topthink/think-trace":"^1.0"
    },

Then execute composer update to update.

If you already have the above, please ignore the above steps.

2. Modify configuration:

Modify the .env file and modify the environment variable APP_DEBUG:

APP_DEBUG = true
APP_TRACE = true

As shown in the picture

 

Once the debugging mode is turned off, no specific error message will be prompted after an error occurs. If you still want to see the specific error message, you can app.phpset it in the file as follows:

// 显示错误信息
'show_error_msg'        =>  true,    

 The effect is as shown in the figure:

 

 

Guess you like

Origin blog.csdn.net/qq_34861341/article/details/126710003