Node.js learning and debugging

by strx on April 2, 2011


I’ve started a github project that could help people learn how Node.js works and see if it could be used to replace BASH+Apache+PHP code. While studying I’ve discovered a great debugging helper, node-inspector: it uses any webkit-based browser integrated inspector to let you debug, step by step, your node code.

Based on this I’ve written a bash helper (I’m on Ubuntu 10.10 but it should works on other environments too) that automatically launch the program, a new google-chrome tab and the debugger.

Github project and instructions:; example node.js programs from 01 to 12 are taken from this RY video on Google Tech Talk.

nodebug is very simple, but useful because it takes care of launching node-inspector, node, google-chrome and when program terminates, killing node-inspector; source follow:

Hope it helps, feel free to use and improve it.

Leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *




You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>