【问题标题】:WSL2 Xdebug PhpStorm Time-out connecting to clientWSL2 Xdebug PhpStorm 连接到客户端超时
【发布时间】:2022-01-10 19:17:40
【问题描述】:

我知道它已被多次询问,但我尝试了 20 种其他解决方案并花了一整天,但似乎没有任何效果。

我有 WSL2 在 Ubuntu 20.04 上运行 PHP 7.4 + Xdebug 2.9.2 并在新的 Windows 11 上使用 PhpStorm 2021.2。

php.ini

zend_extension="/usr/lib/php/20190902/xdebug.so"
xdebug.remote_enable=1
xdebug.start_with_request=trigger
xdebug.discover_client_host=no
xdebug.idekey=PHPSTORM
xdebug.remote_port=9003
xdebug.remote_log="/var/log/xdebug/xdebug.log"
xdebug.remote_host=172.19.144.1

日志

[29220] Log opened at 2022-01-10 18:54:56
[29220] I: Connecting to configured address/port: 172.19.144.1:9003.
[29220] E: Time-out connecting to client (Waited: 200 ms). :-(
[29220] Log closed at 2022-01-10 18:54:56

$ cat /etc/resolv.conf // nameserver 172.19.144.1

【问题讨论】:

    标签: phpstorm xdebug wsl-2


    【解决方案1】:

    这是一个简单的网络问题,它是公共网络而不是私有网络,因此端口 9003 被阻止,即使有防火墙规则(包括公共...)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-09-09
      • 1970-01-01
      • 2019-12-13
      • 1970-01-01
      • 1970-01-01
      • 2013-06-06
      • 1970-01-01
      • 2019-09-29
      相关资源
      最近更新 更多