zendStudio中启用XDebug


<script src="http://feeds.feedburner.com/%7Es/max-horvath?i=http://www.maxhorvath.com/2008/08/how-to-enable-the-xdebug-debugger-in-zend-studio-for-eclipse.html" type="text/javascript"></script> <script src="http://feeds.feedburner.com/%7Es/max-horvath?i=http%3A//www.maxhorvath.com/2008/08/how-to-enable-the-xdebug-debugger-in-zend-studio-for-eclipse.html&showad=true" type="text/javascript"></script>

<script type="text/javascript"> digg_url = 'http://www.maxhorvath.com/2008/08/how-to-enable-the-xdebug-debugger-in-zend-studio-for-eclipse.html'; digg_bgcolor = '#525252'; </script> <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

Zend Studio for Eclipse is a commercial edition of Eclipse plus the PDT plugin and various other additions. Unfortunately Zend decided to disable the Xdebug support of the Eclipse PDT plugin. Nonetheless if you'd like to use Xdebug for debugging your PHP scripts, follow these simple steps to restore the Xdebug functionality of Eclipse.

How to enable Xdebug support

First you need to quit Zend Studio for Eclipse if it is still running.

  • Got to your Eclipse folder, for this article for instance /usr/local/ZendStudio :
    cd /usr/local/ZendStudio .
  • Enter the plugins folder (i.e. /usr/local/ZendStudio/plugins ):
    cd plugins .
  • inside the plugins folder create a new folder named disabled (i.e. /usr/local/ZendStudio/plugins/disabled ):
    mkdir disabled .
  • Now move all files starting with com.zend.php.debug into the disabled folder:
    mv com.zend.php.debug* disabled .
  • Go back to your main Zend Studio for Eclipse folder and start it via:
    ./ZendStudio -clean .
  • Xdebug is available in the main preferences dialog under PHP Debugging.

If you're working on Windows or Mac OS X, the procedure is likewise - you just need to remember the differences on the command line.

Conclusion

In order to get Xdebug working you now need to setup your computer like it is required for Eclipse PDT. Your can find the manual at http://www.eclipse.org/pdt/documents/XDebugGuide.pdf .

The only drawback is that profiling via the Zend Debugger doesn't work anymore in Zend Studio. But for this I would suggest to use Xdebug and KCacheGrind.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值