Debugging Node applications

For debugging in Node, we have node-inspector module available.

To install node-inspector write following:

npm install -g node-inspector

To run your application with node-inspector,

# basically `node-debug` instead of `node`
$ node-debug example.js

where example.js is name of your application.

That should start our application and open the node-inspector interface in Chrome.  Then setup breakpoint in request handler click on line from where you want to start debugging code. Then visit to localhost in new tab.


ProsperaSoft offers Node.js development solutions. You can email at info@prosperasoft.com to get in touch with ProsperaSoft Node.js experts and consultants.

 

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>