How can I use a PHP editor for debugging? [closed]
I am having difficulty manually debugging my code. Which editors support debugging PHP code, and how do I use them?
I use Eclipse PDT as IDE, and it supports debugging (for both web-pages and command-line scripts), using the Xdebug extension -- and Zend Debugger, should I add, even if I have never used it.
There are tutorials available on the net explaining how to setup both of those to get the debugger working. For instance, you might want to read :
- How To Setup a Free PHP Debugger using Eclipse PDT + XDebug
- Setting up Eclipse to Debug Drupal with XDebug (unfortunatly, the screenshots are missing)
- Or (in french, but with screenshots ; so, might be helpful even if not easy to understand) :
- Débugger avec WampServer, Xdebug et PDT
- Configurer Xdebug pour Eclipse PDT en utilisant un serveur de test distant
And here is a screenshot of what it can look like (here, I've set a breakpoint somewhere is the admin section of Dotclear) :
(source: pascal-martin.fr)
I've used Eclipse PDT + Xdebug successfully on several projects, based on several Frameworks -- the last in date being a project based on Drupal.
Netbeans, along with many others have XDebug Support.
http://xdebug.org/docs/
https://stackoverflow.com/questions/tagged/xdebug
Most PHP IDEs have integrated support for some debugger or the other.
Maybe these questions prove helpful:
How do you debug PHP scripts?
Any good PHP IDE, preferably free or cheap?
Notepad++ has a DBGP plugin that works just fine with Xdebug. Couldn't live without.
Netbeans is free, cross-platform and compatible with X-Debug.
Here's instructions on how to configure them: http://wiki.netbeans.org/HowToConfigureXDebug
Also, for paid IDEs, I've enjoyed using PHPDesigner in the past. I also hear PHPNuke is very good. All support X-Debug.
精彩评论