node.js debugging with node-inspector
1. Install the node-inspector using npm.
[code language=”shell”]
sudo npm install node-inspector
[/code]
2. Launch your web application with debug option.
[code language=”shell”]
node –debug app.js
[/code]
3. Launch Launch node-inspector, it will tell you the url to go to for debugging. It uses the default port 8080. If the port 8080 is already taken by other apps, you can tell it to use a different port-number. node-inspector –web-port=8081
[code language=”shell”]
node-inspector
[/code]
4. Open Chrome and go to the url that’s shown on step 3. Usually it’s
[code language=”text”]
http://127.0.0.1:8080/debug?ws=127.0.0.1:8080&port=5858
[/code]
Search within Codexpedia

Custom Search
Search the entire web

Custom Search
Related Posts