debugging application with nodejs
There are two easy ways to debug application written in nodejs which are :-
a) Nodejs - ChromeDev Tools -
First you need to run node --inspect, assuming you are trying to debug index.js scripts.
node --inspect=0.0.0.0:9229 index.js
next, you need to click on the "green" button.
Place your break points as shown above
b) Visual Code - using this approach all you need to do is select "Debug" -> "Start Debugging"