Magento Resource | E-Commerce Generation Explorer

TAG | debugging

There is one important thing when we debugging  Magento.

If we don’t want refresh the magento cache for every small modifation made, the best thing is DISABLE the CACHE when we do the modifty and test Magento.

The way is:  SYSTEM => CACHE MANAGEMENT => CACHE CONTROL => ALL CHANGE => DISABLE

Then, we can do what we want, and see what we changed quickly…

·

Developing for Magento is often hard, even they had some error log some time, but we still need to know what’s exactly wrong.

We can add items to Magento’s system log and exception log in our code.

Here’s an example of how it is using:
1) Turn on logging: Admin > Configuration > Developer > Log Settings > Enabled = Yes

2) Example code snippet where you might find this useful:

1
2
3
4
5
<?php
$response = curl_exec($ch); 
//just an example of something - might use this in a custom payment or shipping module
Mage::log($responseBody);
?>

3) Watch on var/log/system.log and var/log/exception.log for raw information from this.

We may have  file permission errors sometime, so we might need to double check our folder permissions (like 777 or 775).

·

Theme Design by devolux.nh2.me