Description
Summary
Debugger Pulls configurations from the projects .vscode/launch.json
, but does not run them propperly.
Description
I'm working on projects, that requires Debuggers for both PHP and JavaScript. As a consequence, I don't have some crazy buildsteps or elaborate setup, like modern stacks do.
Just a browser with --remote-debugging-port
set to 9222
and a LAMP Stack with XDebug on port 9003
.
I have a .vscode/launch.json
, that defines debuggers for Both XDebug and attaching to Chrome. They both run fine on NVim-DAP and VSCode.
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Chrome",
"port": 9222,
"request": "launch",
"url": "http://localhost",
"type": "chrome",
"webRoot": "${workspaceFolder}/app",
},
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceFolder}/app"
}
}
]
}
The ZED-Debugger definitely pulls the Config from my .vscode/launch.json
and offers to run them.
However, there are various issues when starting either of these.
XDebug
In some instances, it tells me. "Port 9003 already in use"
In another project I used port 9006. there it seemingly starts up, but then hangs after making the first connection, (Without anything being shown in any of the logs).
Attaching to Chrome
Here it is more clear, what is wrong. This is the error I'll get.
error: Zed cannot determine how to run this debug scenario. `build` field was not provided and Debug Adapter won't accept provided configuration because: chrome: is not a valid adapter name
Steps to trigger the problem:
-
Install chrome or chromium
-
Launch it with the
--remote-debugging-port=9222
argument
chromium --remote-debugging-port=9222
-
Put the
.vscode/launch.json
from above into you projects.vscode
folder. -
Launch the "Attach to Chrome" debugger.
Actual Behavior:
An error
error: Zed cannot determine how to run this debug scenario. `build` field was not provided and Debug Adapter won't accept provided configuration because: chrome: is not a valid adapter name
Expected Behavior:
Either ignore the .vscode/launch.json
configs, since they are clearly not compatible.
Or respect the configs and behave like other DAP-Clients do.
Both NeoVim and VScode can work with the given .vscode/launch.json
just fine. So there must be some sort of standard.
System Specs
Zed: v0.190.0 (Zed Preview)
OS: macOS 15.4.1
Memory: 8 GiB
Architecture: aarch64