How to enable the developer mode?

developer-mode
apache
mage-mode
nginx

(Dmitry Fedyuk) #1

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
<VirtualHost 127.0.0.1:807>
	ServerName localhost.com
	DocumentRoot "C:/work/magento/1.9.2.0-rm3/code"
	SetEnv MAGE_IS_DEVELOPER_MODE "any value"
	SetEnv RM_DEVELOPER "1"
</VirtualHost>

Magento 2

Set the webserver environment variable MAGE_MODE to the value developer.

An example for Apache:

Listen 1900
<VirtualHost 127.0.0.1:1900>
	ServerName localhost.com
	DocumentRoot "C:/work/mage2.pro"
	SetEnv MAGE_MODE "developer"
	SetEnv MAGE_RUN_TYPE "website"
	SetEnv MAGE_RUN_CODE "mage2_pro"
	RemoteIPHeader X-Forwarded-For
</VirtualHost>

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 

How to check with a console whether a store is in the developer or production mode?
How to switch a store from the developer mode to production?
How to diagnose Magento 2 errors
How to avoid redeploying the static content after it is changed?
Why is not the static content generated automatically despite my store is in the «developer» mode?
How to diagnose Magento 2 errors
How to see the diagnostic reports in the Google Chrome browser console?
How to workaround a «Segmentation failt» failure on «bin/magento setup:di:compile»?
How to diagnose the «We're sorry, an error has occurred while generating this email» failure
How to fix the problem of loading css and javascript files?
How to diagnose «500 Internal Server Error»?
How to use the inline translation?
How to programmatically check whether Magento 2 runs in the developer mode
(Dmitry Fedyuk) #2

See also: