Eclipse PHP 的 Xdebug 问题
我目前正在尝试在安装了 Eclipse PHP 的 XP 计算机上设置 Xdebug。我正在使用 WAMP,我认为我已经按照书本完成了所有操作(如几个在线教程的预期),但是当我尝试执行调试并启动会话时,什么也没有发生,这也由 Eclipse 通知。在 Firefox 中会打开另一个选项卡,并附加 GET 字符串,但仅此而已。
我不知道该怎么做才能让它工作,但我猜我不是第一个遇到这个问题的人,所以在这里问可能不是一个坏主意!
我非常感谢任何可以帮助我朝正确方向前进的答案。调试对我来说是一件全新的事情。
谢谢!
这里还有一些信息:
Eclipse 说:
Launching: Waiting for Xdebug session
这是我的 php.ini 的外观:
[xdebug]
zend_extension="c:/wamp/php/ext/php_xdebug-2.1.0beta2-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_mode=req
xdebug.idekey=default
xdebug.remote_log="C:/xdebug.log"
xdebug.remote_port=9000
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0
以及 URL:
http://localhost/debugtest/index.php?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=12658406113583
I am currently trying to setup Xdebug on an XP computer with Eclipse PHP installed. I am using WAMP and I'll think I have done everything by the book (as intended by several tutorials online), but when I'll try to execute the Debugging and start the session, nothing happens, which also is notified by Eclipse. Another tab is opened with the GET-string appended in Firefox, but that's about it.
I have no Idea of what to do to make it work, but I'll guess that im not the first one having this issue, so asking here might not be a bad idea!
I am very grateful for any answers that could help me out in the right direction. Debugging is a brand new thing for me.
Thanks!
Here is also some info:
Eclipse says:
Launching: Waiting for Xdebug session
Here is how my php.ini looks:
[xdebug]
zend_extension="c:/wamp/php/ext/php_xdebug-2.1.0beta2-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_mode=req
xdebug.idekey=default
xdebug.remote_log="C:/xdebug.log"
xdebug.remote_port=9000
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0
And the URL:
http://localhost/debugtest/index.php?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=12658406113583
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当一切都检查正确后(浏览器路径、监听端口、php -i、XDEBUG_SESSION_START=...、胶带等)并且它仍然坐在那里等待 Godot,重新启动解决了问题。是的,Windows。
After everything checked out correct (browser path, listening port, php -i, XDEBUG_SESSION_START=..., duct tape, etc.) and it still sat there waiting for Godot, rebooting fixed the problem. Yay Windows.
你的东西看起来不错,但是你的 IDE 设置如何?
它正在侦听哪个端口以及它发送什么 KEY?
另外,我总是在代码中设置 xdebug_break() 断点,以使 xdebug 捕获并开始与我的 IDE 对话。
你尝试过吗?
Your stuff looks good but, how is your IDE setup?
What port is it listening on and what KEY is it sending?
Also, I always set a xdebug_break() breakpoint in code to get xdebug to catch and start talking to my IDE.
Have you tried that?