Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

CharlesW's avatar

APP_DEBUG=true not working?

Hello,

In my .env file, APP_DEBUG is set to true per http://lumen.laravel.com/docs/errors.

However, when an error occurs I’m just seeing “Whoops, looks like something went wrong” rather than the stack trace I’m expecting.

Any ideas?

— Charles

0 likes
10 replies
mercuryseries's avatar

@CharlesW

Make sure your .env.example file contains the following

APP_ENV=local
APP_DEBUG=true

Later rename file .env.example to .env

This should fix the problem.

CharlesW's avatar

@as-many, thanks for the fast feedback. My .env file starts with those lines, and I even copied and pasted yours into to make sure I didn’t have a typo.

Thinking it could be a permissions issue, I’ve also set `stora recursively to 777. No joy.

— Charles

CharlesW's avatar

Thanks for the idea. I tried it, and no change.

1 like
mercuryseries's avatar

Try to delete the storage/meta/compiled.php file.

If you haven't this file, you can run the command php artisan optimize

Hope that solves your issue.

zachleigh's avatar

Is it actually set? Try dumping this:

Config::get('app.debug')
CharlesW's avatar

Try to delete the storage/meta/compiled.php file. If you haven't this file, you can run the command php artisan optimize

There’s no storage/meta directory, and as far as I can tell Lumen’s Artisan doesn’t support optimize.

In case it’s useful, when I do php artisan --version I get “Laravel Framework version Lumen (5.1.2) (Laravel Components 5.1.*)”.

— Charles

CharlesW's avatar
CharlesW
OP
Best Answer
Level 2

The solution was to uncomment the line Dotenv::load(__DIR__.'/../'); in bootstrap/app.php.

Seems weird that this is commented out by default, especially when their use is documented at http://lumen.laravel.com/docs/installation.

— Charles

3 likes

Please or to participate in this conversation.