You can always start nodemon
right inside of VSCode, but I’ve found it a much better experience starting nodemon
in Terminal, and simply attaching VScode process to its --inspect
option.
So, start your server with:
$ nodemon --inspect server.js
And add within your launch.json
:
{
"type": "node",
"request": "attach",
"name": "Attatch to inspect",
"restart": true,
"protocol": "inspector"
}