How to turn on error messages in magento 2

Ranjit Shinde picture Ranjit Shinde · Jan 6, 2016 · Viewed 54.5k times · Source

I have installed magento 2 and it working.I just created the Hello world module and it working now.

My issue was I had called non existing method in execute method.

While trying to get it to work I tried to load the page it shows blank white screen, but no error.

How do I get errors to display in magento2?

Answer

Pratik Oza picture Pratik Oza · Jan 9, 2016

Add following code in index.php file :-

error_reporting(E_ALL);
ini_set('display_errors', 1);