How do I debug a Node.js server application?
Right now I'm mostly using alert debugging with print statements like this:
The V8 debugger released as part of the Google Chrome Developer Tools can be used to debug Node.js scripts. A detailed explanation of how this works can be found in the Node.js GitHub wiki.
There is also ndb, a command line debugger written in Node.js itself.