8

I am trying to remotely debug NodeJs application, which uses clusters. When I run my app locally, and I am attaching to it, VS Code see child processes and breakpoints works:

enter image description here

VS Code Config:

{
  "name": "Attach",
  "type": "node",
  "request": "attach",
  "port": 50131,
  "internalConsoleOptions": "neverOpen",
  "skipFiles": ["<node_internals>/**"],
  "autoAttachChildProcesses": true
},

VS Code result:

enter image description here

However, in remote host, process starts same way, same port, I am able to attach debugger to it, but VS Code Can't see child processes and source maps (to connect local files breakpoints to remote, in debug config I have correct host address):

enter image description here

So the difference between local env and remote is Windows vs Unix, and in remote app is run via Forever (module, however, even Forever, without clusters remote debugging works correct).

Where can be an issue?

EDIT: I can't use SSH debug in my organization.

Michał Wojas
  • 509
  • 1
  • 5
  • 16

1 Answers1

3

Give vscode extension Remote SSH a try. It let you run remote code locally.

https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh

Algo7
  • 2,122
  • 1
  • 8
  • 19