Debugging is a helpful feature for developers to identify the causes of issues. Most of the modern application frameworks provides you the option to enable debug mode including Laravel. It is an good idea to keep enable debug mode in your development environment. In your production environment, this value should always be false.

This tutorial help to enable/disable debug more in a Laravel application.

Enable Debug in Laravel

To enable the debug mode, edit “.env” file in the root directory of your Laravel application. Set the APP_DEBUG environment variable value to “true”.

How to Enable Debug Mode in Laravel Debugging Laravel PHP PHP Framework

Disable Debug in Laravel

Set the APP_DEBUG environment variable value to “false” in “.env” environment configuration file.

How to Enable Debug Mode in Laravel Debugging Laravel PHP PHP Framework

The users needs details messages in log files need to adjust LOG_LEVEL environment variables. Read this to know more about logging in Laravel.