Debug coffeescript using node inspector

12 Apr 2014 tech

First, make sure node inspector is running.

node-inspector &

Note that the default port of node inspector is 5858.

To debug coffe script, use command:

coffee --nodejs --debug-brk path/to/file

To debug jasmine test cases written in coffee, use command:

node --debug-brk node_modules/jasmine-node/bin/jasmine-node --coffee path/to/spec/

Then open http://127.0.0.1:8080/debug?port=5858 in your browser. That's it!

comments powered by Disqus