Debugging node.js in VS Code
You can easily debug node.js code that’s running locally in VS Code.
Attach to a running process
- Run your node app
- In vscode select “Attach to node” from command palette
- Select the process for your app, it will attach and you can hit breakpoints, etc.
Reference: https://code.visualstudio.com/docs/nodejs/nodejs-debugging