-
Launch the node process in the VM with --debug-brk flag. This will break the execution of the node process in the start.
node --debug-brk <app.js> <args>
. Node.js versions >= 6.3 support new inspector protocol:node --inspect <app.js> <args>
-
Create a launch config in VS Code with a mapping from the VM file system to the local file system
{
"name": "Attach node",
"type": "node",
"request": "attach",
"address": "localhost",