开发者

How can I use a PHP editor for debugging? [closed]

开发者 https://www.devze.com 2022-12-16 12:21 出处:网络
As it currently stands, t开发者_开发问答his question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely so
As it currently stands, t开发者_开发问答his question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

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) :

How can I use a PHP editor for debugging? [closed]


(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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号