gvlasov
gvlasov

Reputation: 20015

How to show errors in browser?

I'm getting started with Sylius. Symfony version is 3.2.7. On some pages I have some errors. The pages show text:

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

I want the errors to be displayed in browser, with full stacktrace.

I know I can see the error in var/prod.log, but it doesn't show the whole stacktrace, only the last frame. And seeing the error in browser would be more convenient: that's what I'm used to after a lot of working with Yii and Magento.

Is that possible with Symfony/Sylius?

Upvotes: 0

Views: 1127

Answers (3)

Tigran Azatyan
Tigran Azatyan

Reputation: 52

Also you can use symfony installer app to serve request

Use symfony serve --no-tls in symfony folder. It will show you requests and errors in red.

Upvotes: 0

gvlasov
gvlasov

Reputation: 20015

I added /app_dev.php to the url to run the website in development environment, and there I can see the stack trace.

That is, https://[my_domain]/app_dev.php/[page] instead of https://[my_domain]/[page]

Upvotes: 1

Roman Lytvynov
Roman Lytvynov

Reputation: 503

By default Symfony show trace in dev environment. In prod environment it show simple error message. For running your project in dev you can use built-in PHP Web Server or Web Server Bundle

Upvotes: 0

Related Questions