Magento 2 Developement

Error Reporting In Magento 2

If you got similar message you might be curios how to enable error reporting in magento 2 instead of checking log file in /var/report folder.

By default Magento 2 run in “default” mode : Exceptions are not displayed to the user; instead, exceptions are written to log files. To enable error reporting in this mode you need to rename local.xml.sample to local.xml within pub/errors directory.

You should run the Magento software in “developer” mode when you’re extending or customizing it. Uncaught exceptions display in the browser and exception is thrown in the error handler, rather than being logged. To switch to developer mode you need to perform following actions:

  • delete the contents of the var/generation and var/di directories:
  • Set the mode:

    The following message displays:

Useful links:
Magento modes
Change magento mode

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.