I am trying to debug a Node.JS application in VS Code, but when the terminal opens, I get this message:
Error: listen to EADDRINUSE: 5858
My application uses the StrawJS framework ( https://github.com/simonswain/straw ) and it starts several different processes at the same time. I think this is the cause of the error, because there are many different processes trying to use the same debugger.
I found a similar question ( VSCode will not stop at breakpoints when the first node prcess calls the second ), but configure the port in the attach.js didn file. The problem persists.
This is my actual launch.json file:
{ "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "node", "request": "launch", "port": 5858, "program": "${workspaceRoot}/run.js", "stopOnEntry": false, "args": [], "cwd": "${workspaceRoot}", "preLaunchTask": null, "runtimeExecutable": null, "runtimeArgs": [ "--nolazy" ], "env": { "NODE_ENV": "development" }, "externalConsole": true, "sourceMaps": false, "outDir": null } ]}
Thanks!
Geasi puozzo
source share