使用 NetBeans / XDebug 调试 Zend Framework 项目
有人能够设置 Zend Framework 项目的 NetBeans 调试吗?我的机器上本地运行 XAMPP 以及 NetBeans 6.8。从 phpinfo() 来看,XDebug 已正确安装在 XAMPP 上。我使用 NetBeans 启动调试会话,它连接到 XDebug 并且页面打开,但它不会在任何断点处停止。
如果您感兴趣的话,这是 NetBeans 日志的摘录:
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="165" status="stopping" reason="ok"></response>
FINE [org.netbeans.modules.php.dbgp.ServerThread]
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at org.netbeans.modules.php.dbgp.ServerThread.run(ServerThread.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[catch] at java.lang.Thread.run(Unknown Source)
此超时看起来很可疑,但我不确定它是否导致了问题。
这是我的 php.ini 配置的摘录:
extension=php_xdebug-2.0.5-5.3-vc6.dll
xdebug.extended_info = 1
xdebug.idekey = "netbeans-xdebug"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
你有什么建议吗?
Has anyone been able to set up NetBeans debugging of a Zend Framework project? I have XAMPP running locally on my machine, as well as NetBeans 6.8. From the looks of phpinfo(), XDebug is properly installed on XAMPP. I start debugging session with NetBeans, it connects to XDebug and the page opens, however it will not stop at any break point.
This is an excerpt from the NetBeans log if you're interested:
<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="165" status="stopping" reason="ok"></response>
FINE [org.netbeans.modules.php.dbgp.ServerThread]
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
at org.netbeans.modules.php.dbgp.ServerThread.run(ServerThread.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[catch] at java.lang.Thread.run(Unknown Source)
This timeout looks suspicious, but I'm not sure if it's causing the problem.
This is an excerpt from my php.ini configuration:
extension=php_xdebug-2.0.5-5.3-vc6.dll
xdebug.extended_info = 1
xdebug.idekey = "netbeans-xdebug"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
Do you have any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经解决了。问题是 XDebug 必须通过 Zend Extension Manager(而不是通过常规 PHP 扩展)启用,而 XAMPP 1.7.2(我有)中没有 Zend Extension Manager。我降级到 XAMPP 1.7.0 并且它有效。我还必须禁用 Zend Optimizer 并下载更新版本的 XDebug。这是我最终的 PHP 配置:
I've solved it. The problem is that XDebug had to be enabled through Zend Extension Manager (not through regular PHP extensions), and there was no Zend Extension Manager in XAMPP 1.7.2 (which I had). I downgraded to XAMPP 1.7.0 and it worked. I also had to disable Zend Optimizer and download a newer version of XDebug. This is my final PHP configuration: