Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

> npm install -g node-inspector

Start Node-Inspector

> node-inspector

Node Inspector v1.1.1

Visit http://127.0.0.1:8080/?port=5858 to start debugging.

Run your App

By default, the debug port is 5858 so we don't need to specify it here.

> node --debug app.js

To pause your app until Node-Inspector can connect to the app, use the following syntax.

This is helpful when trying to debug code that runs at startup time.

>  node --inspect-brk <app.js>

Open the Debugger

Open your chrome browser to:

chrome://inspect> node --debug-brk app.js