Thursday 20 July 2017

[Help] Remote debugging node on a Vagrant VM with VSCode

Hi all,I'm currently trying to get vscode setup to attach to some node code running on a vagrant vm.Versionsnode v7.10.1vscode 1.14.1vagrant 1.9.2Relevant ConfigurationVSCode Launch Configuration { "type": "node", "request": "attach", "name": "Attach to Remote", "address": "localhost", "port": 15858, "localRoot": "${workspaceRoot}/apps/api/", "remoteRoot": "/opt/gg/apps/api/", "protocol": "inspector" } Node Launch Command (on VM) node --inspect-brk=5858 src/db/transactions/households/.create-for-user.test.js Error from VSCode when Trying to AttachEnsure Node was launched with --inspect. Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: read ECONNRESET). If I try to telnet to the debug port on the VM, it seems fine, but if I try to telnet to the port from my local comp, it closes with: Connection closed by foriegn hostAnother important thing to note is that I have that port passed through to my local comp through my Vagrant config (but offset by 10000) so should be localhost:15858I know I had remote debugging working at one point (before inspector was the default debugger) but i'm unsure of what i'm missing here. Please let me know if you all have any good tips in trying to pull this off.Thanks

Submitted July 21, 2017 at 01:49AM by jjohnson338

No comments:

Post a Comment