How to enable the developer mode?

Magento supports a developer mode.
The developer mode is intended to be used and useful during development.
Particalary, Magento in developer mode shows exceptons on screen instead of showing a generic error message like “There has been an error processing your request”.

How to enable the developer mode

Magento 1.x

Set the webserver environment variable MAGE_IS_DEVELOPER_MODE to any value, for example:

Listen 807
	DocumentRoot "C:/work/magento/"
	SetEnv MAGE_IS_DEVELOPER_MODE "any value"

Magento 2

Set the webserver environment variable MAGE_MODE to the value developer.

An example for Apache:

Listen 1900
	DocumentRoot "C:/work/"
	SetEnv MAGE_MODE "developer"
	SetEnv MAGE_RUN_TYPE "website"
	SetEnv MAGE_RUN_CODE "mage2_pro"
	RemoteIPHeader X-Forwarded-For

An example for Nginx:

location ~ \.php$ {
    fastcgi_param MAGE_MODE "developer";

From 2015-08-24 the developer mode can also be enbabled from the command line:

bin/magento deploy:mode:set developer 

See also: