Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So far I've been using the following tactics on a local dev box - don't try this on a live store obviously!:</p> <ol> <li>Turn on Template Path Hints + Block Names in System -> Config -> Developer. This will get you to the phtml file that does the final render and also the block object type that it uses. Unless you've IP limited this, every visitor will see these!</li> <li>Then in the phtml files to dig further you can easily Zend_Debug::dump($var) to inspect the variable/object in question and find the object type etc.</li> <li>Search in your editor or grep through /app/code directories to find which files define the object type you've just found - although as it based on Zend the correct file path can be worked out most of the time from the object class.</li> </ol> <p>Also</p> <ul> <li>A handy trick is to deliberately insert an error in a php/phtml file, Magento gives you a nicely formatted error screen with a call stack which is interesting reading</li> <li>echo() statements in the core files normally work pretty well, in the Magento set up they don't normally trigger the html headers to be sent at the wrong time</li> <li>Use an IDE like Netbeans/Eclipse/Zend studio etc and put all the Magento code into your project, the resulting phpdoc information, 'open declaration' and code assist will save you hours of searching</li> <li>Spend the time to get Xdebug working on your test server with an IDE that allows you to make use of it. The easiest one I've found to setup from scratch (on a Mac) is a local Mamp install with Netbeans as the IDE - the Netbeans site will walk you through this, once you've got this working well you can forget about most of the other tricks!</li> </ul> <p>These are just the things I've tried so far - more suggestions please! I've still not found a technique to debug config problems from XML issues in the multitude of XML files that Magento uses, problems here tend to fail silently and are really hard to track down as a result + the xml documentation is awful.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload