【问题标题】:xDebug remote debugging using netbeansxDebug 使用 netbeans 进行远程调试
【发布时间】:2010-11-04 05:02:57
【问题描述】:

我正在尝试使用 xdebug 远程调试到我的服务器,我在服务器上的 php ini 中有以下内容:

zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"

[XDebug]
xdebug.remote_enable = 1
;xdebug.remote_host = "<MYIP>"
xdebug.remote_port = 9000
xdebug.idekey = "netbeans-xdebug"
xdebug.remote_connect_back = 1
xdebug.remote_handler="dbgp"
xdebug.remote_log = "/var/log/xdebug.log"

我只尝试了 remove_host 和 remote_connect_back ,但似乎都没有建立连接。我在 netbeans 中收到等待连接输出。

我已确保在服务器上为传出和传入的 tcp 连接打开端口 9000,并且在启动调试器时,我从远程服务器上的 tcpdump 获得此输出:

04:48:05.003307 server.25096 > local.9000: S 49319161:49319161(0) 赢得 5840 (DF)

04:48:08.000027 server.25096 > local.9000: S 49319161:49319161(0) 赢得 5840 (DF)

04:48:14.000034 server.com.25096 > local.9000: S 49319161:49319161(0) 赢得 5840 (DF)

04:48:26.000018 server.com.25096 > local.9000: S 49319161:49319161(0) 赢得 5840 (DF)

04:48:30.290025 server.com.25085 > local.9000: S 4252863523:4252863523(0) 赢得 5840 (DF)

04:48:50.000018 server.com.25096 > local.9000: S 49319161:49319161(0) 赢得 5840 (DF)

04:49:38.000026 server.com.25096 > local.9000: S 49319161:49319161(0) 赢得 5840 (DF)

我对 tcpdump 不熟悉,但它看起来只是一种单向通信,我只是不确定从哪一边?

另外我在netbeans中的项目配置是:

远程网站 FTP SFTP

项目网址:http://site.ca

索引(空白)

参数(空白)

远程连接:(设置和测试)

上传目录:(空白)

上传文件:手动

Preserver..:未选中

直接上传..:未选中

高级:

-- 打开浏览器

-- 路径映射设置服务器和本地到 /public_html/ 文件夹,两者都带有尾随破折号 -- 没有调试器代理

我已经能够让 netbeans 在本地为 web 和 cli 使用 xdebug,但似乎无法让它在远程工作。非常感谢任何帮助。

干杯,

【问题讨论】:

  • 您使用的是哪个 xdebug 版本? xdebug.remote_connect_back 是在 2.1 版本中引入的,也许你使用的是 2.0.x?在这种情况下,将 xdebug.remote_host 与您的 netbeans 计算机的 IP 地址一起使用,只是为了检查它是否正常工作,这将是下一步。

标签: php xdebug


【解决方案1】:

您的 Netbeans 是否知道它必须为 XDebug 听 9000?

我对你的帐户有点困惑,但如果你的 apache 没有在本地运行,那么你必须指定一个 remote_host-IP,这样 XDebug 才能重新连接。虽然那时你的 remote_connect_back 应该已经工作了。

您是否配置了本地防火墙以允许 XDebug 端口上的传入请求?

最好的

拉斐尔

【讨论】:

    猜你喜欢
    • 2012-04-06
    • 1970-01-01
    • 2013-07-13
    • 2015-07-04
    • 2011-06-19
    • 1970-01-01
    • 2011-11-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多