【问题标题】:NetBeans can't connect Xdebug after updates更新后 NetBeans 无法连接 Xdebug
【发布时间】:2021-04-28 11:32:02
【问题描述】:

我犯了一个错误,允许安装 Ubuntu 18.04 更新。使用相同配置执行此操作后,NetBeans 12.1 无法连接到 Xdebug。我认为问题出在较新版本的 Xdebug (3.0.2) 上。

# cat /etc/php/7.2/apache2/conf.d/20-xdebug.ini

zend_extension=xdebug.so

xdebug.remote_enable=on
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9003

有人遇到过这样的问题吗?

【问题讨论】:

  • 1) “NetBeans 12.1 无法连接到 Xdebug” 否。它是 Xdebug 连接到 IDE 而不是其他方式。 2) 是的,它是 Xdebug v3——v3 使用了与 v2.2 不同的配置参数。您当前的 Xdebug 配置在 v3 中什么都不做。只需检查xdebug.org/docs/upgrade_guide 并相应地更新您的配置(只需重命名配置参数,添加一个新的,删除现有的)。
  • 感谢您的回答!这真的很有帮助!工作配置:xdebug.mode=debug,develop

标签: php netbeans xdebug php-7 xdebug-3


【解决方案1】:

我花了一整天半的时间试图让 NetBeans ISE 12.0 调试器工作 - 它总是挂在“等待连接 (netbeans-xdebug)”上。

我现在已经解决了这个问题——正如你所说,Xdebug 版本 3 与版本 2 非常不同,并且网络上的大多数文档都没有跟上。这是您需要的页面:Upgrade Guide

这是适合我的配置(我将 IDE 设置保留为使用端口 9000):

zend_extension=/usr/lib/php/20180731/xdebug.so
xdebug.mode=debug
xdebug.start_with_request=trigger
xdebug.client_host=127.0.0.1
xdebug.client_port=9000

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-10-18
    • 1970-01-01
    • 2015-11-16
    • 1970-01-01
    • 1970-01-01
    • 2013-07-10
    • 2013-12-15
    相关资源
    最近更新 更多