使用 Xdebug 和 Eclipse 调试 PHP 时出现错误消息:“脚本意外终止,调试结束”
调试时出现以下错误:
php.ini 设置:
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
I'm getting the following error when debugging:
php.ini settings:
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
假设没有语法错误,请确保您没有任何监视程序,这些监视程序会在调试器尝试评估它们时导致脚本崩溃。
根据我的经验,这是过早死亡的最常见原因。
不管怎样,您可能还希望更改内部 Web 浏览器,因为 IE 往往会提供神秘的错误消息,或者使用外部浏览器会话(并使用远程调试)。
Assuming no syntax errors, make sure that you do not have any watches that cause the script to crash as the debugger attempts to evaluate them.
From my experience, this is the most common cause for such early death.
Regardless of that, you may also wish to change your internal web browser, as IE tends to provide cryptic error messages, or use an external browser session (and use remote debugging).
删除手表表达式为我解决了这个问题
removing watch expressions solved this issue for me
如果您在 apache 中使用 mod_fcgid,
则为 FcgidIOTimeout 设置的默认值为 40 秒,因此您可以让此 xdebug 在 40 秒内终止,
以更改此值,您需要在 apache httpd.conf 文件中添加以下行,
此行适用于 10分钟,您可以根据您的要求将此值设置为任何其他时间限制,
即使我遇到了同样的问题,我找到了此解决方案以获取更多详细信息,请点击下面的链接
http://jonathonhill.net/2011-05-05/uploading-large-files/ (提供有关该值的信息的相关链接)
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html (并搜索 FcgidIOTimeout)
If you are using mod_fcgid in your apache
the default value which is set for FcgidIOTimeout is 40 seconds so you get this xdebug to terminate in 40 seconds
to changed this value you need add the following line in you apache httpd.conf file
this is for 10 minutes you can set this value to any other time limit according your requirement
even i had the same problem i found this solution for further details follow the links below
http://jonathonhill.net/2011-05-05/uploading-large-files/ (related link which gives info about the value)
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html ( and search for FcgidIOTimeout)
我在不同的平台上遇到了同样的问题。
使用 Eclipse 3.7.2、PHP 5.4.3 和 Xdebug 2.2.0 运行 x64 linux,查看变量时可能会出现此错误消息。
请参阅 Xorg 问题 #797 和 问题#824。
我可以确认此问题在 2.2.0 版本中未得到解决。该解决方案是在 2.2.0 之后提交的,因此您必须下载 git 副本< /a> (检查下载页面)。
编译git版本后,手头的问题就解决了。
I ran into the same issue on a different platform.
Running x64 linux with Eclipse 3.7.2, PHP 5.4.3 and Xdebug 2.2.0, this error message may appear when viewing variables.
See Xorg issue #797 and issue #824.
I can confirm that this issue is not resolved in release 2.2.0. The resolution is committed after 2.2.0, so you'll have to download a git copy (check the download page).
After compiling the git version, the issue at hand is resolved.
我也遇到了这个问题,谷歌搜索了一段时间后我决定恢复到2.2rc,因为它是最新版本,这个问题不会发生(实际上不是“总是”而是“有时”,只需要重新启动)。
在此之前我也尝试过 2.3dev 但没有成功。
I also got this problem, after Googling for awhile I decided to revert back to 2.2rc because it's the latest version that this issue does not occur (actually not "always" but "sometimes", just need to relaunch).
Before that I've tried 2.3dev too with no luck.