Saturday, August 6, 2011

Debugging

Debugging with node-inspector


  1. Install node-inspector

    npm install -g node-inspector
    
  2. Enable debugging on the program you want to debug:


    node --debug HelloWorldServer.js
    

  3. Launch node inspector:


    node-inspector &
    

  4. Open a WebKit browser ie. Chrome to http://127.0.0.1:8080/debug?port=5858
  5. Click on the Scripts tab and choose your js file from the list
  6. Happy Stepping Over, Stepping Into, Stepping Out!