help needed: manual nvim-dap configuration for javascript works on windows but not on linux #1203
Replies: 4 comments 3 replies
-
Looks like they changed their default binding logic, and they now only bind to ipv6 It should work if you change the configuration to: dap.adapters["pwa-node"] = {
type = "server",
host = "::1",
port = "${port}",
executable = {
command = "node",
args = {"/path/to/js-debug/src/dapDebugServer.js", "${port}"}
}
} A good way to debug issues like this is to run the command in the terminal. E.g.:
Gave the following output:
|
Beta Was this translation helpful? Give feedback.
-
I tried this, but unfortunately, it still doesn't work for me. It gives me the same error: Couldn't connect to ::1:${port}: ECONNREFUSED. Here's my edited configuration:
If I run the terminal command, it gives me this output:
EDIT: Also, I tried troubleshooting the error, but when I run
Thank you for such a prompt response, and apologies for troubling you! |
Beta Was this translation helpful? Give feedback.
-
@battlelitany did you manage to make it work? if not, did you tried running the adapter manually in a separate terminal?
That path is a bit suspicious, in my case
Because I installed it with Mason, how did you installed the adapter? |
Beta Was this translation helpful? Give feedback.
-
Gotcha, I asked just in case because one can sometimes make typos when writing paths. Can you try modifying your adapter config this way?
Then first run the adapter manually and then try to start a debug session in nvim. Also can you share your config for |
Beta Was this translation helpful? Give feedback.
-
Debug adapter definition and debug configuration
Hi, I am painfully new to coding/nvim in general, so please forgive me if this is a dumb question. I followed the instructions from here: Javascript Adapter Installation
I got it all set up and working correctly on Windows 11. My configuration file is here at pastebin. I am using Pop OS for Linux. I downloaded the js-debug-dap from the vscode-js-debug release and updated the pathway to dapDebugServer.js.
For whatever reason though, it gives me an error saying it can't connect to localhost. I'm sure it must just be something silly I forgot to do, but I can't figure out how to solve it. I tried looking up help and guides, but most of them show you how to set it up with nvim-dap-vscode-js. I couldn't get that to work though, and my current manual setup already works on Windows, so I'd prefer to stick with it. Any help would be much appreciated!
Debug adapter version
No response
Steps to Reproduce
Expected Result
It shows the nvim-dap-ui on Windows, but will not run on Linux.
Actual Result
node exited with code 1
Couldn't connect to localhost:${port}: ECONNREFUSED
Beta Was this translation helpful? Give feedback.
All reactions