Nodemon: Breakpoints in node applications

Nodemon is tool to improve backend JS development. It reloads files automatically so you don't have to restart the server every time. Another cool thing is that you can debug the code in chrome dev tools.

Lets take the express generated site as environment.

Fist we need to install nodemon.

$ npm i nodemon

Then run nodemon with --inspect parameter

$ node ./node_modules/nodemon/bin/nodemon.js --inspect ./bin/www

You can browse the code and even set breakpoints by clicking on the line number. This way you can inspect variables without having to use console.log.

When you are done, click play icon to continue execution of a program.

Thanks @mxstbr for bringing this up.