Iron-node

iron-node

Debug Node.js code with Chrome Developer Tools.

Yes you read it right iron-node helps you to debug your node code using chrome devtools, it makes use of electron creates a browser-window opens the dev-tool re-compile native modules against electron!

It not only helps you to debug your code, but also helps to debug your node build scripts!

Keep in mind to place the keyword debugger; to a place where you want to stop.

Get it: npm install -g iron-node

Sample usage:

CLI:

1
iron-node PATH_TO_NODE_JS_FILE [--customparm1=foo --customparm2=bar];

npm scripts:

1
2
3
4
5
6
7
8
9
  ...
  "scripts": {
    ...
    "debug-mocha": "iron-node node_modules/mocha/bin/_mocha",
    "debug-grunt": "iron-node node_modules/grunt-cli/bin/grunt build",
    "debug-gulp": "iron-node node_modules/gulp/bin/gulp.js",
    ...
  },
  ...

GIF FTW!

Suggest a module

Comments