Setting Developer Mode in Magento outputs Errors to screen

 

I updated the <VirtualHost> element in my Apache configuration file (apache/conf/extra/httpd-vhosts.conf) to include the environment variable “MAGE_IS_DEVELOPER_MODE”:

<VirtualHost *:80>
    documentroot "c:/xampp/htdocs/magento"
    servername magento.server.dev
    SetEnv MAGE_IS_DEVELOPER_MODE "1"
</VirtualHost>

By doing this, I can see any error that may have occurred during process of request.  This was done as a result of following the Magento For Developers: Part 5 – Magento Models and ORM Basics, which led me to the Wiki article Configure Magento error page, and a StackOverflow article discussing how to set up the environment variable.

As stated in the Wiki article, Magento handles outputs this way to eliminate the need of changing the index.php file for a production, staging or development server.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s