Differences between revisions 1 and 2
Revision 1 as of 2013-11-11 21:20:53
Size: 788
Editor: JoshSoref
Comment: Node Inspector
Revision 2 as of 2013-11-12 15:30:11
Size: 984
Editor: Carlos
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
== Installing Node Inspector == == Install Node Inspector Globally ==
{{{
npm install -g node-inspector
}}}
Line 7: Line 10:
Instead, you can install Node Inspector: Please have your [[npm_rc|npm environment]] configured so that you don't need to use `sudo npm install -g ...`.

== Or Install Node Inspector Locally ==
Line 9: Line 15:
node install node-inspector npm install node-inspector
Line 13: Line 19:

Please have your [[npm_rc|npm environment]] configured so that you don't need to use `sudo npm install -g ...`.
Line 20: Line 24:
 1. Open [[http://google.com/chrome|Google Chrome]] (or some other Blink derived web browser) to [[http://localhost:8080]].  1. Open [[http://google.com/chrome|Google Chrome]] (or some other Blink derived web browser) to [[http://127.0.0.1:8080/debug?port=5858]].
Line 22: Line 26:

For more information on using node-inspector check out the GitHub Repository [[https://github.com/node-inspector/node-inspector]]

Node Inspector

Debugging Node.js by hand can be frustrating. You could do: node debug some_script.js the_arguments, but you wouldn't want to.

Install Node Inspector Globally

npm install -g node-inspector

Please have your npm environment configured so that you don't need to use sudo npm install -g ....

Or Install Node Inspector Locally

npm install node-inspector
cd ~/node_modules/node-inspector
npm link

Running Node Inspector

Assuming that you have your npm environment configured, you can now do:

  1. Run node-inspector.

  2. Open Google Chrome (or some other Blink derived web browser) to http://127.0.0.1:8080/debug?port=5858.

  3. Run node --debug-brk path/to/some_script.js the_arguments.

For more information on using node-inspector check out the GitHub Repository https://github.com/node-inspector/node-inspector

NodeInspector (last edited 2013-11-12 15:30:11 by Carlos)