Lumen application does not show stack trace in debug mode
P粉959676410
P粉959676410 2023-09-02 14:50:57
0
1
423

I have two Lumen microservices that (as far as I know) have the same configuration. One displays a user-friendly error page and the other does not.

Both services have this simple controller method:

public function test() { echo $a; exit; }

One of the services only shows:

Oops! An error occurred The server returns "500 Internal Server Error". Something is broken. Please let us know what you are doing when this error occurs. We will fix it as soon as possible. sorry cause any inconvenience.

Other services show stack traces, etc.

APP_DEBUG=true and APP_ENV=local on both environments. I verified these settings by echoing them in the controller method.

What setting might I be missing that prevents me from seeing the stack trace?

P粉959676410
P粉959676410

reply all (1)
P粉684720851

The problem is that I have aconfig/app.phpfile in which thedebugsetting is missing. Adding'debug' => env('APP_DEBUG', false),to the array solved my problem.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!