Xdebug 3 不适用于 PhpStorm 和 WSL2 (Ubuntu 20.04)

问题描述

Xdebug 3、WSL2 (Ubuntu 20.04) 和 PHPStorm 是我的设置。我不知道怎么了!

我的 ini 设置:

xdebug.mode=debug 
xdebug.discover_client_host=1 
xdebug.client_host=10.0.0.107 (windows IP address)
xdebug.client_port=9003 
xdebug.idekey=PHPSTORM 

PHPStorm 设置截图:

PhpStorm PHP Debug Settings.

PhpStorm CLI Interpreter

验证错误

Web Server Validation


PHPStorm 中的特定文件上手动单击“调试”会给我以下日志:

[5669] [Step Debug] INFO: Checking remote connect back address.
[5669] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[5669] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[5669] [Step Debug] WARN: Could not discover client host through HTTP headers,connecting to configured address/port: 192.168.64.1:9000. :-|
[5669] [Step Debug] INFO: Connected to debugging client: 192.168.64.1:9000 
(fallback through xdebug.client_host/xdebug.client_port). :-)

但是我在本地浏览网站或通过 CLI 运行时的自动断点从未被触发。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)