devtool
: npm install devtool -g
Runs Node.js programs inside Chrome DevTools (using Electron).
This allows you to profile, debug and develop typical Node.js programs with some of the features of Chrome DevTools.
Use the devtool
command in place of node
: devtool myscript.js

NodeMonkey: npm install node-monkey
It captures anything that would normally be logged to the terminal, [...] and passes it to the browser where it is then logged to the console for inspection.
This uses Chrome's(webkit) actual built-in Developer Tools Javascript console for output.
- Include NodeMonkey in your script:
var nomo = require('node-monkey').start({port: 50501});
- Open up
http://127.0.0.1:50501
and inspect element, etc to open up the developer console.
- Then run your script as normal:
node myscript.js
One nice thing about NodeMonkey(and node-codein suggested below), is that you can leave up the developer console(no refreshes) everytime you make a change and restart the script, NodeMonkey just continues to listen.
Another thing NodeMonkey has is locations(path, line number, and column), so you know where the message came from (see image below).
I prefer NodeMonkey because it uses the awesome Chrome developer console. Update: devtool
is looking to be my new choice.

Debug Node.js code with Chrome Developer Tools on Linux, Windows and OS X.

This is still in development but you can watch the progress on nodejs/node#2546
The goal is to provide a "unified debugger support across various v8 embedders".
What we aim for Node is what we have for Chrome for Android. You basically go to chrome://inspect on a stable version of Chrome and it debugs your running Node instance.
Mancy: npm install mancy -g
A cross platform NodeJS REPL application based on electron and react frameworks.

node-codein: npm install node-codein
Even though this tool uses the Chrome executable, it does not use the Chrome/Webkit inspector console for output. Instead it uses its own proprietary/special console which feels a bit chintzy.
- Include codein in your script:
var codein = require("node-codein");
- Run
path/to/chrome/chrome.exe --app=http://localhost:55281
to open the special node-codein
console.
- Then run your script as normal:
node myscript.js

This is by far the least efficient method to inspect and view console output because of the long list of steps below. node-webkit also has some oddities and changes to the normal Node API which can conflict with your existing libraries or dependencies.
- Add a HTML file
- Add the script to debug in a
<script src="script-to-debug.js"></script>
tag to the HTML file.
- Update your
package.json
main
attribute to point at the HTML file.
- Run
nw.exe path/to/project_folder/
.
- Then wait for node-webkit window to appear.
- Click the hamburger icon and wait for th the inspector window (just like Chrome/Webkit) to start, and go the
Console
tab.
- Every time you make a change to your script, go through steps 4-6.
You can also use the remote debugging flag, so you can just pop open a chrome tab and visit the page.
nw.exe --remote-debugging-port=9222 path/to/project_folder/
- Visit:
http://localhost:9222/
console.log
calls in scripts. Node Inspector is really just for inspecting variables and adding breakpoints. – MLM Sep 26 '14 at 17:45