I had always thought of using Eclipse to debug Magento’s complex code flow, and tried number of times before. But without any success I had to abandon it, and thought was not applicable for Magento, remember the fox and the sour grapes
I also tried using Trial Version of Zend Studio, but with no sucess.
But today I was looking at fontis’s blog http://www.fontis.com.au/blog/magento/debugging-with-xdebug and they had indeed used XDebugger and are debugging Magento through command line. So, I thought why not give it a try once again! And as you have already expected i was successfull today!! Wasn’t easy though
Here’s what I’ve done to get it working on WAMP. Before getting this done I assume you have created a new PHP Project and imported all files, beforehand in Eclipse.
Step 1. A very good explanation of downloading Eclipse PDT with Zend Debugger can be found here Installing_the_Zend_Debugger
Step 2. Configuring the Zend Debugger can also be found on same location but I would like to emphasize on its setting here, coz I missed myself on first run
Use these settings for For Zend debugger in php.ini
[Zend]
zend_extension_ts=D:/wamp/bin/php/php5.2.5/ext/ZendDebugger.dll
zend_debugger.allow_hosts=127.0.0.1
zend_debugger.expose_remotely=always
You should not forget to enable Zend Debugger extension on WAMP. Now restart Wamp. You are now well set with Eclipse PDT and Zend Debugger. Next thing you need to do is make debugging settings in your Eclipse.
Step 3. In you Eclipse Go to Windows–>Preference–>Debug and set as follows

Step 4. Then Windows–>Preference–>Server and set as follows

While setting Server configuration you will be prompt to add server path in path mapping, place that relative to your www root Example: /mysite (which will open as localhost/mysite) and select the files in your workspace.
Step 5. Now all your settings are done. Now let me tell you about debugging a Block Class of Magento, say Mage_Catalog_Block_Product_List. Go to the class file and add a breakpoint anywhere inside _getProductCollection function.
Step 6. Go to Run–>Open Run Dialog and configure as following
Step 7. All set to go now, Run profile as web page Run–>Debug As–>PHP Webpage.
You can now see PHP Debug perspective, and use Step Over or Step Into to debug your values. Here is what I got.
Hope this might be a life changer.. at least it is for me!



really nice post im try right now
Thanks for the post. Like you, I gave up before. I will try again.
Yeha… you should give it a try..once again..
wow this is great if you want to have it working with WAMP. Good for developers who are not really connected often to the internet.
I wish more people would write things like this! Not only is this extremely useful for Magento, but it’s great for anyone using ZEND in general. Excellent information, thanks for taking the time to contribute!
Hello Subesh,
I have been searching through the web to find the solution to build a multi seller module for Magento commerce but with no luck. So I have come up to your blog to seek for help. I am new to Magento but not new to opensource platform and MVC model. I am being locked down to the early stage of module building for multi seller. So if you could lend a helping hand to me it would be great.
By the way nice post. Thanks.
Multiseller Module is yet to be worked out in Magento, there are some payed Module for that.. i guess from Aheadworks! It is a very vast thing So I don’t know where can i help you from..
Thanks Subesh for the quick reply. I have started coding for the multi seller module and so far I was able to build only login html and while inserting into database i got following message:
Can’t retrieve entity config: seller/seller
I can send you the files if you can take a look at it.
Thanks for the response to my post on this blog, but I am sorry to say that.. this page belongs to PDT expanation, so plz email me if you want some help.
Thanks