I'm trying to debug my remote node server through VSCode and it doesn't stop on any of the breakpoints i've configured.
I'm running VSCode on my mac where i have one copy of the node project and i have another copy of the same node project on a remote machine, both copies of the node project are synced.
i'm running the node server on the remote machine using the following command:
sudo node --inspect=5858 app.js
and my VSCode launch.json configurations are as follow:
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"address": "remote server addr",
"localRoot": "${workspaceFolder}",
"remoteRoot": "the path to project directory on remote server",
"protocol": "auto"
}
When i launch the debugger on VSCode it seems like it connects to the remote server but it doesn't stop at any of my breakpoints.
VSCode version is 1.28.1
Node version is 9.11.2
What am i missing?