NodeJS

Debug Nodemon within VSCode

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"
}

Standard

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.