swoole / yasd

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

最新版vscode不支持 #121

Closed liuquanhao closed 3 years ago

liuquanhao commented 3 years ago

vscode版本: Version: 1.56.0 Commit: cfa2e218100323074ac1948c885448fdf4de2a7f Date: 2021-05-04T22:06:21.189Z Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Darwin x64 19.6.0

php框架为: laravel-s

yasd配置: vagrant@homestead:~$ cat /etc/php/7.4/cli/conf.d/26-yasd.ini zend_extension=yasd yasd.debug_mode=remote yasd.log_level=0 yasd.remote_host=192.168.10.1 yasd.remote_port=10000

vscode配置: { "name": "Listen for Xdebug", "type": "php", "request": "launch", "port": 10000, "log": true, "pathMappings": { "/home/vagrant/work/admin-back-end": "${workspaceRoot}" } },

  1. 使用vscode做ide调试,yasd使用remote模式,打开vscode debug插件的log,开始调试时,vscode的debug log窗口显示:

<- launchResponse Response { seq: 0, type: 'response', request_seq: 2, command: 'launch', success: true }

  1. strace php -e ./laravels start,会卡死在: brk(0x557bd917d000) = 0x557bd917d000 openat(AT_FDCWD, "debug.log", O_RDWR|O_CREAT|O_APPEND, 0666) = 6 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 getcwd("/home/vagrant/work/admin-back-end/bin", 4096) = 38 ioctl(5, TCGETS, 0x7ffe35059540) = -1 ENOTTY (Inappropriate ioctl for device) fstat(5, {st_mode=S_IFREG|0755, st_size=5231, ...}) = 0 fstat(5, {st_mode=S_IFREG|0755, st_size=5231, ...}) = 0 read(5, "#!/usr/bin/env php\n<?php\n\n/*\n "..., 4096) = 4096 read(5, " return false;\n }\n\n /**\n"..., 4096) = 1135 close(5) = 0 socket(AF_INET, SOCK_STREAM, IPPROTO_IP) = 5 connect(5, {sa_family=AF_INET, sin_port=htons(23458), sin_addr=inetaddr("132.226.23.125")}, 16) = 0 getpid() = 4244 write(6, "520\0<?xml version=\"1.0\" encoding"..., 526) = 526 sendto(5, "520\0<?xml version=\"1.0\" encoding"..., 525, 0, NULL, 0) = 525 recvfrom(5, "f", 1, 0, NULL, NULL) = 1 recvfrom(5, "e", 1, 0, NULL, NULL) = 1 recvfrom(5, "a", 1, 0, NULL, NULL) = 1 recvfrom(5, "t", 1, 0, NULL, NULL) = 1 recvfrom(5, "u", 1, 0, NULL, NULL) = 1 recvfrom(5, "r", 1, 0, NULL, NULL) = 1 recvfrom(5, "e", 1, 0, NULL, NULL) = 1 recvfrom(5, "", 1, 0, NULL, NULL) = 1 recvfrom(5, "g", 1, 0, NULL, NULL) = 1 recvfrom(5, "e", 1, 0, NULL, NULL) = 1 recvfrom(5, "t", 1, 0, NULL, NULL) = 1 recvfrom(5, " ", 1, 0, NULL, NULL) = 1 recvfrom(5, "-", 1, 0, NULL, NULL) = 1 recvfrom(5, "i", 1, 0, NULL, NULL) = 1 recvfrom(5, " ", 1, 0, NULL, NULL) = 1 recvfrom(5, "1", 1, 0, NULL, NULL) = 1 recvfrom(5, " ", 1, 0, NULL, NULL) = 1 recvfrom(5, "-", 1, 0, NULL, NULL) = 1 recvfrom(5, "n", 1, 0, NULL, NULL) = 1 recvfrom(5, " ", 1, 0, NULL, NULL) = 1 recvfrom(5, "r", 1, 0, NULL, NULL) = 1 recvfrom(5, "e", 1, 0, NULL, NULL) = 1 recvfrom(5, "s", 1, 0, NULL, NULL) = 1 recvfrom(5, "o", 1, 0, NULL, NULL) = 1 recvfrom(5, "l", 1, 0, NULL, NULL) = 1 recvfrom(5, "v", 1, 0, NULL, NULL) = 1 recvfrom(5, "e", 1, 0, NULL, NULL) = 1 recvfrom(5, "d", 1, 0, NULL, NULL) = 1 recvfrom(5, "_", 1, 0, NULL, NULL) = 1 recvfrom(5, "b", 1, 0, NULL, NULL) = 1 recvfrom(5, "r", 1, 0, NULL, NULL) = 1 recvfrom(5, "e", 1, 0, NULL, NULL) = 1 recvfrom(5, "a", 1, 0, NULL, NULL) = 1 recvfrom(5, "k", 1, 0, NULL, NULL) = 1 recvfrom(5, "p", 1, 0, NULL, NULL) = 1 recvfrom(5, "o", 1, 0, NULL, NULL) = 1 recvfrom(5, "i", 1, 0, NULL, NULL) = 1 recvfrom(5, "n", 1, 0, NULL, NULL) = 1 recvfrom(5, "t", 1, 0, NULL, NULL) = 1 recvfrom(5, "s", 1, 0, NULL, NULL) = 1 recvfrom(5, "\0", 1, 0, NULL, NULL) = 1 write(6, "feature_get -i 1 -n resolved_bre"..., 41) = 41 recvfrom(5,

vscode的debug log显示为: <- launchResponse Response { seq: 0, type: 'response', request_seq: 2, command: 'launch', success: true }

new connection 1

之前的vscode版本能够输出发送到yasd中断位置的日志,现在只有new connection 1

也就是卡在了yasd给vscode发送feature_get -i 1 -n resolved_breakpoints

huanghantao commented 3 years ago

确实,加了新的命令,后续的支持了。最近有点忙,这周给支持一下。

ondineyuga commented 3 years ago

查了很久的问题然后看到了这篇帖子,打开看了一下楼主和我vscode版本完全一致,同求早日支持。。。

huanghantao commented 3 years ago

master分支已经支持