Magento – How to show errors and debug.

Sometimes you may run in to issues with your website using Magento that you will need to troubleshoot. In this article, we will go over how to enable errors, enable logging, go over debugging procedures, and troubleshoot connection errors common with Magento.

How to enable error logs in Magento

Since Magento does not automatically log errors, you will need to manually enable this option so that you can begin logging any issues with your website.

To turn on logging, you can navigate to System > Configuration > Developer > Log Settings and set the «Enabled» option to «Yes»

enablinglogs

 

Your log settings will also provide you the location for the logs as well which will be located with the rest of the Magento files

Debugging Magento

Here is a list of options to help in debugging Magento.

Clear the Cache

If you are using caching within Magento, one of the first steps to debugging Magento is to clear the Magento cache. There are two ways to clear the cache:
1. System > Cache Management > Select All > “Refresh” Mass action > Submit

Clearcache

2. Delete the “cache” directory under [base_magento_dir]/var/

Clear the Browser Cache

Sometimes your browser may be saving a copy of the website you are viewing for a faster viewing experience. When this happens, your browser may sometimes save a copy of your website responding with an error. To check for sure that you have resolved any issues or if the error was just temporary, try clearing your web browsers cache by following the instructions here: How to clear your browser’s cache

Disable Compilation

Before installing new extension, upgrading Magento, or removing any modules you’ll want to disable Magento compilation.

To do so choose System >> Tools click on Compilation then chose the Disable option.

Re-Index All
System > Index Management

Re-index1

 

Select All [check-boxes]

Re-index2

 

Actions = Reindex Data > Submit

reindex3

 

Connection Issues 

When you first install and configure Magento you will be presented with a screen that looks like the one below. This is where you set up the connections to your database. 

connectionconfig

If you encounter database connection issues, check the connection string values in “magento/app/etc/local.xml” by ensuring your values are up to date and set correctly you quickly remedy your issue. 

Get a debugging plugin!
Yes there is an app for that. There are a few different options when looking for a debugging tool, so be sure to find one that suits your needs and expectations. These plugins can help isolate and sometimes even resolve your Magento issues.

You can find more information about these types of plugins at the following links:

https://www.magentocommerce.com/magento-connect/magneto-debug.html

http://www.mconnectmedia.com/blog/top-4-debugging-tools-for-magento-developer-useful-tricks/

 

 

Was this article helpful?

Yes (2)
No (0)

We're sorry you didn't find this article very helpful. Please help us improve it by leaving your feedback below.

Error