I am running node app using pm2 with --inspect flag. I am able to debug my app on the following url:
chrome-devtools://devtools/remote/serve_file/@62cd277117e6f8ec53e31b1be58290a6f7ab42ef/inspector.html?experiments=true&v8only=true&ws=local.abc.com:9003/node
How can I debug this application using VS Code built in debugger?
If you have launched your node app from the command line create this "attach" launch config:
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9222,
"protocol": "inspector"
}
or let VS Code launch your app and attach to it in one go:
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}/your_app.js",
"protocol": "inspector"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With