Magento: How to debug error quickly

Magento provides log file to maintain each type of error on your application. By this you can add log error or exception to magento’s system log file. Its very handy to view coding errors. Developing for Magento is often hard, especially since it’s not always possibly to have error reporting on (and even when it is on, its hard to find exactly what’s wrong!).

There are some steps to manage log errors:

Step-1: Go to Admin > Configuration > Developer > Log Settings > Enabled
and set its value to ‘Yes’.

Step-2: Go to your code file:

For example code written like:

$output = "Hello word"; 
Mage::log();

Step-3: Go to your application var/log/system.log and var/log/exception.log and open files.

Note: To add log error to log file, folder and file must be writable permission proper.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*