I'm new to Magento. I'm used to working in dot net, where you can place the debugger where you need, so that you can identify bugs and other issues.
So, now I am learning Magento with phpStorm. Please let me know how to set line by line debugging from my custom module?
thanks in advance.
1 Answer 1
Nothing specific to setup, in your server install xdebug debugger, make sure that you see it listed in phpinfo output in a file in your Magento root. Then turn on "Start listen for php debug connections" from Run menu or toolbar icon. Place your break points wherever you want. Use php storm bookmarklet to initiate debug session with cookie. If all is successful PhpStorm will popup on your break point whenever the code reaches it.
-
HI petar, we are placing debugger successfully in any files, but the problem is the debugger is not going to the line by line. suppose I have function (<?php echo $this->mymethod() ?>) in test.phtml file when we place the debugger it is not going the mymethod. it is showing error can't find or it is non-object method.Manoj Kumar– Manoj Kumar2013年10月11日 10:51:51 +00:00Commented Oct 11, 2013 at 10:51
-
If you place a break point does it stop there? If it does then debugger works. Then it is matter to point correct files in the setup. Usually I have configured deployment server in PhpStorm settings which is for the project in question and configured mapping of the files for it. This way PhpStorm is not wandering where to find filesPetar Dzhambazov– Petar Dzhambazov2013年10月11日 17:55:51 +00:00Commented Oct 11, 2013 at 17:55
Step intobutton on the debugger. Or if it shows a php error maybe the method does not exist.