Closed BilderLoong closed 9 months ago
I think this error is because the lua pattern used to extract the debug server port
https://github.com/mxsdev/nvim-dap-vscode-js/blob/03bd29672d7fab5e515fc8469b7d07cc5994bbf6/lua/dap-vscode-js/utils.lua#L117
isn't compatible with the output of the js-debug-adapter
which actually run the js-debug/src/dapDebugServer.js file.
Output of running js-debug-adapter
.
$ cat js-debug-adapter
#!/usr/bin/env bash
exec node "/Users/birudo/.local/share/nvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js" "$@"%
$ ./js-debug-adapter
Debug server listening at 127.0.0.1:8123
Hey @BilderLoong, there have been no new commits to this repo since last Year. Could you point out the solution you got? Thanks.
@carlos-algms I followed the workaround in https://github.com/mxsdev/nvim-dap-vscode-js/issues/57#issue-1890647297 to lock to version 1.76.1 to fix the issue. If you use https://github.com/jay-babu/mason-nvim-dap.nvim then the solution would look something like
require("mason-nvim-dap").setup({
automatic_installation = false,
ensure_installed = {
-- Due to a bug with the latest version of vscode-js-debug, need to lock to specific version
-- See: https://github.com/mxsdev/nvim-dap-vscode-js/issues/58#issuecomment-2213230558
"js@v1.76.1",
},
})
Or if you install it manually, MasonInstall js-debug-adapter@v1.76.1
(you may need to run MasonUninstall
first to remove the later version)
My lazy.nvim plugin config:
Full error message: