NodeJs was released almost 9 years ago. The default debugging process of NodeJs (read Node.js) is quite clumsy. You are already aware of the need to add --inspect
to the node script with node inspector. It is also dependent on chrome. Then look at the proper web socket connection which is hard and debug using chrome node debugger. To be honest, it is a pain in the neck.
Finally, Google chrome labs has released ndb, which they say is "An improved debugging experience for Node.js, enabled by Chrome DevTools". It is a boon to debug a nodejs app.
I am going to show a step by step process of debugging nodejs application with ndb. In other words, you will learn how to debug a nodejs application using ndb. Below you can see it in action, let's roll up your sleeves and get started: