How to enable error reporting in Magento2

Here is the tip, how you can enable magento error reporting in magento 2

Connect FTP OR login into cpanel account and go to the following directory

pub/errors

find the local.xml.sample and rename to local.xml

and also on magento root folder find index.php and put the display error code at the bottom

error_reporting(E_ALL);
ini_set(‘display_errors’, 1);