Magento 2: Set developer mode

Magneto supports a developer mode.

This is intended for internal development on a system already secured. During customizing the Magento Software, you should run magento software in developer mode.  It shows exceptions on screen instead of showing a generic error message like “There has been an error processing your request“.

In Developer mode :

  • Static view files are not cached, they are written to the Magento pub/static directory every time they’re called
  • Display uncaught exceptions in the screen.
  • System logging in var/report is verbose
  • An exception is thrown in the error handler, rather than being logged

Here is following way to setup developer mode :

1.  Add below line in  index.php

$_SERVER['MAGE_MODE'] = 'developer';

2. Run following command in terminal/command line :

bin/magento deploy:mode:set mode=developer