Debugging Node applications - tooltwist/documentation GitHub Wiki

While developing a node application it is usually easiest to use supervisor to automatically restart the server after every change to the source code.

supervisor app.js

If you need a debugger to single step through your application, node-inspector is awesome. After installing supervisor and node-inspector:

  1. Start node-inspector

    node-inspector &

  2. Start your application

    supervisor --debug app.js

  3. Open the debugger in your browser (Safari or Chrome) at http://127.0.0.1:8080/debug?port=5858.

Refresh the screen to update the list of scripts (there's a pullout button at the top left).

You can also edit your Javascript on the fly.

⚠️ **GitHub.com Fallback** ⚠️