【问题标题】:Why can't I start a debug session on Eclipse using Xdebug?为什么我不能使用 Xdebug 在 Eclipse 上启动调试会话?
【发布时间】:2012-02-10 16:37:22
【问题描述】:

我一直在使用 Xdebug 在 Eclipse 中进行调试,没有任何问题,但由于某种原因,从今天早上开始,当我尝试启动调试会话时,我从 Eclipse 中收到如下错误:

“找不到文件‘http://localhost/index.php?XDEBUG_SESSION_STOP_NO_EXEC=ECLIPSE_DBGKEY=13288911493954’。

在我的 phpinfo 文件中,我可以看到 Xdebug 正在运行。

我正在使用 Elipse 3.7.1、Xdebug 2.1.3。

这是我的 php.ini 文件中的 Xdebug 配置: zend_extension = "c:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.3-5.3-vc9-x86_64.dll"

[XDebug] 
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler=dbgp

任何帮助将不胜感激。

【问题讨论】:

    标签: eclipse xdebug eclipse-pdt


    【解决方案1】:

    您收到的消息是因为 Eclipse 正在尝试停止调试会话。这也是一个错误的 URL,因为它应该说“http://localhost/index.php?XDEBUG_SESSION_STOP_NO_EXEC=1”。为什么它要停止,我不能告诉你,但是 ?XDEBUG_SESSION_STOP_NO_EXEC=1 被 Xdebug 捕获并使请求无法继续。 要找出答案,您或许可以使用 xdebug.remote_log 设置 (http://xdebug.org/docs/all_settings#remote_log) 创建一个日志文件,记录 Eclipse 试图让 Xdebug 做什么。

    【讨论】:

    • 感谢您的回答。实际上,我发布了点击停止按钮时显示的消息。当我尝试开始调试时,消息如下:找不到文件'eu.localhost/…'。我在 tmp 文件夹中创建了 xdebug.log 并将以下行添加到我的 php.ini xdebug.remote_log = "./../tmp/xdebug.log" 我重新启动了服务,并再次尝试,但是当我打开 xdebug .log 文件,我发现它是空白的。有什么想法吗?
    • 太疯狂了...当我点击我之前评论中的链接时,调试会话实际上开始了...但是当我从 Eclipse 尝试时它没有...我想我只是每次我想开始调试会话时,都必须为这篇文章添加书签并点击该链接。
    猜你喜欢
    • 2015-06-08
    • 1970-01-01
    • 2020-07-16
    • 2013-08-16
    • 1970-01-01
    • 2013-06-13
    • 1970-01-01
    • 2012-04-01
    • 2013-07-25
    相关资源
    最近更新 更多