Describe the bug
Hello! It looks like the logic to set the CWD is coupled with vscode. When using other clients (eg, nvim-dap), it is necessary to "manually" set the "cwd" for the debugger to launch.
To Reproduce
For neovim, I can provide a minimal init.lua, if necessary. Given a working DAP setup, it's just a matter of:
Set a breakpoint;
Start a debugging session;
The debugger doesn't launch (or attach) if the parameter is missing from the configuration.
Log File
Firstly, nvim-dap logs
[debug-adapter stderr] TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined
at Object.relative (node:path:1194:5)
at YH (/home/dev/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js:113:2456)
at $u.launchProgram (/home/dev/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js:116:405)
at n (/home/dev/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js:113:4094)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Su.launch (/home/dev/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js:110:30910)
at async sg.captureLaunch (/home/dev/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js:116:9417)
at async sg._launch (/home/dev/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js:116:9164)
at async Promise.all (index 3)
at async sg._boot (/home/dev/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js:116:8288) {
code: 'ERR_INVALID_ARG_TYPE'
Describe the bug Hello! It looks like the logic to set the CWD is coupled with vscode. When using other clients (eg, nvim-dap), it is necessary to "manually" set the
"cwd"
for the debugger to launch.To Reproduce For neovim, I can provide a minimal
init.lua
, if necessary. Given a working DAP setup, it's just a matter of:Log File
Firstly, nvim-dap logs
And the log file from the trace, here.
VS Code Version: N/A
Additional context This situation is a bit of a bummer, since it might lead users to believe this adapter only works with vscode.