1

I digged all the net, but still can't find answer. I run nodejs code with nginx on a remote VPS. In the local project folder created the launch.json and can run debug mode on the server with F5 button. Local project folder only has .vscode with launch.json This is launch.json

 {
    "version": "0.2.0",
    "configurations": [{
        "name": "attach",
        "type": "node",
        "request": "attach",
        "port": 5858,
        "address": "x.x.x.x",
        "restart": true,
        "sourceMaps": false,
        "outFiles": [],
        "localRoot": "${workspaceRoot}",
        "remoteRoot": "/views/"
    }]
}

On a server

[root@tri ~]# node --debug /usr/appfolder/views/index.js
Debugger listening on [::]:5858
Example app listening at http://:::5000

Through ngnix both index.js and css codes are accessible outside the server to the world.

But Visual Studio Code doesn't see this index.js to debug through. I need to debug through remote code on VPS.

Thank You

Joe
  • 11
  • 2
  • Joe, did you by chance resolve this? If so, may I ask you to share the path. I'm in the same place. Thx. – Ric May 20 '17 at 22:44

0 Answers0