Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento Debugging Environment

I looked for ideas on setting up a Magento development environment when we first started using it for our site last year. I didn't find anything that work really well, so I stayed with var_dump'ing using the log files.

Now that Magento has another year under its belt and several hundred more developers I was wondering if anyone has found a better solution for debugging Magento.

We use Eclipse as our development environment. We tried a pre-2.0 release of PDT with the Zend Debugger and didn't have much luck.

like image 278
spdaly Avatar asked Nov 17 '09 22:11

spdaly


People also ask

How do I debug plugins in Magento 2?

Go to your Admin -> Stores -> Configuration -> Developer; then, select a specific store scope; and finally set “Template page hints” and “Add block names to hints” to Yes. You will immediately notice changes in both frontend and backend: check some images in the Cookbook.

Where are Magento logs stored?

The log files are located in the <magento-folder>/var/log/ folder.


2 Answers

How about using FirePHP?

http://ajzele.net/utilize-firebug-and-firephp-to-speed-up-magento-development

It made my life a hell of a lot easier.

like image 82
Manos Dilaverakis Avatar answered Sep 19 '22 13:09

Manos Dilaverakis


I use a combination of var_dump with xDebug and Magento's Mage::Log method. Mage::Log is particularly nice, as it'll do some auto-expanding and pretty printing of objects if you pass them in (I'm not sure if that's the logger, or just Magento's __toString implementation).

If I'm on my local development box I use Console.app to keep an eye on the log file, otherwise it's a simple

tail -f /path/to/log/file

That combined with some custom modules I've built for debugging the config and layout keep me happy. (although I prefer a light weight text editor toolchain vs. the One True IDE tool chain, so your results may vary)

like image 42
Alan Storm Avatar answered Sep 22 '22 13:09

Alan Storm