swoole / yasd

Yet Another Swoole Debugger
https://huanghantao.github.io/yasd-wiki/
Apache License 2.0
357 stars 35 forks source link

wsl2 ubuntu20.04 环境下 yasd 调试异常 #168

Closed 1242048704 closed 2 years ago

1242048704 commented 2 years ago

在vscode开启监听,wsl2环境下运行代码且在vscode控制台可以看到响应信息并建立Tcp连接的情况下仍然显示不了调试信息

1242048704 commented 2 years ago

yasd配置 vscode配置 建立连接1 建立连接2

1242048704 commented 2 years ago

建立连接3

1242048704 commented 2 years ago

求教作者大大及路人大佬们🙏🙏🙏

huanghantao commented 2 years ago

先尝试下单个脚本,比如一个test.php文件。看看能否用上,然后再运用到框架里面。

he426100 commented 2 years ago

wsl2 docker 调试 hyperf 没问题,启动命令加上 -e 就行了

he426100 commented 2 years ago
php --ri yasd

yasd

Yasd => enabled
Author => codinghuang <codinghuang@qq.com>
Version => 0.3.9-alpha
Built => Apr 20 2022 15:59:59

Directive => Local Value => Master Value
yasd.breakpoints_file => no value => no value
yasd.debug_mode => remote => remote
yasd.remote_host => host.docker.internal => host.docker.internal
yasd.remote_port => 9000 => 9000
yasd.depth => 1 => 1
yasd.log_level => -1 => -1
yasd.max_executed_opline_num => 0 => 0
yasd.init_file => no value => no value
yasd.open_extended_info => 0 => 0
xdebug.coverage_enable => 1 => 1
xdebug.profiler_enable => 1 => 1
xdebug.remote_autostart => 1 => 1
xdebug.remote_connect_back => 0 => 0
xdebug.remote_mode => req => req

launch.json

{
    // 使用 IntelliSense 了解相关属性。 
    // 悬停以查看现有属性的描述。
    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 9000
        }
    ]
}
imbian commented 2 years ago

你的wwwroot目录是不是软连接过去的?

huanghantao commented 2 years ago

你的wwwroot目录是不是软连接过去的?

不要使用软连接,目前调试不了软连接的目录

1242048704 commented 2 years ago

谢谢大佬们,已解决