Today I had another mind-blowing experience.
As I was writing a software project in Node, which has reached it’s critical level for me, where I just don’t want to go on, with sys.puts and sys.inspect to find out, what my code is doing, I was in search of a Debugger for node.
Yesterday I tried out Cloud9’s Javscript IDE, but while being really a great project, is still in the very beginnings and I wasn’t able to set breakpoints in Chrome nor in Firefox. Perhaps I was doing something wrong, but it just didn’t work out of the box for me and I couldn’t find any documentaion yet. Anyways, Cloud9 is going to be really a great IDE some day!
So I was tinkering around and remembered, that I came accross a link to a project that involves Webkit’s Web Inspector as a debugger for Node.js. The Project is called Node- Inspector.
A npm install node-inspector gave me a good start and I got all that was necessary on my system.
There is some confusion in the Readme and the screencast of how to startup node-inspector.
However a fast node —help, made things clear.
So here is my Installation Instruction:
Start node-inspector, by typing: node-inspector& (this will start the Webserver)
Startup your favourite Webkit browser (e.g. Safari, Chrome, etc) and go to 127.0.0.1:8080
node —debug-brk hello.js will startup things.
Now go back to your browser and hit the “Connect to Node” button.
all your node are belong to us now!
Web Inspector is about the greatest debugger around and seeing it full screen debugging node is just mind-blowing cool!
So check it out!