There are several ways to debug a node.
Personally, I use the many useful provisions of console.log , console.dir and util.inspect in my code and follow the logic in this way.
Of course, unit tests go hand in hand with debugging. Write tests to prove your code is working. Unit tests will cover most errors.
You must write unit tests for your node.js code. nodeunit great for general testing.
If you use express as your web engine, use expresso
source share