【问题标题】:Problems with xdebug and CentOSxdebug 和 CentOS 的问题
【发布时间】:2012-04-14 17:41:05
【问题描述】:

我正在尝试安装 xdebug,但在 eclipse 上收到以下错误消息:

正在启动:等待 xdebug 会话

它在 57% 时停止加载。

使用 NetBeans 我得到:

等待 xdebug 会话

所以我认为问题在于 CentOS 上的 xdebug 配置

我的php.ini 配置:

zend_extension = /usr/lib64/php/modules/xdebug.so 
[debug]
; Remote settings
xdebug.remote_enable=true
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000

phpinfo() 显示已安装的 xdebug。
我的 centOS 版本是 6.2。

感谢任何帮助。

【问题讨论】:

  • 如果你做一个远程调试日志(见xdebug.org/docs/all_settings#remote_log),它会说什么? netbeans/eclipse 也在监听哪些端口? (netstat -a -n | grep LISTEN | grep tcp)?
  • 问题出在端口上。无论如何,我用“setsebool -P httpd_can_network_connect 1”修复了。
  • 只是为了满足我的好奇心,remote_log 说了什么?
  • 感谢 user1333540 报告修复它的内容。我刚刚在 CentOS 6.4 上遇到了同样的问题,我从来没有想过要查看 SELinux 设置 - 在阅读您的答案之前,我什至不知道“setsebool”是什么。非常感谢您的反馈,您可能刚刚挽救了我的工作。

标签: php linux eclipse centos xdebug


【解决方案1】:

我刚刚在我的 Centos 6.3 机器上安装了 NetBeans 7.2.1 和 xdebug 2.1.4,并在 NetBeans 中收到“等待 xdebug 会话”消息。在弄乱了 php 设置并在 phpinfo() 中确认 xdebug 正确数小时后无济于事后,我的解决方案是在 NetBeans 中设置默认浏览器...工具->选项->网络浏览器。将此设置为 Firefox 解决了它!希望这对其他人有帮助...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-05-30
    • 1970-01-01
    • 2011-07-31
    • 2016-08-04
    • 2011-01-15
    • 2015-04-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多