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.
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.