Skip to content

Instantly share code, notes, and snippets.

@roc
Created August 14, 2015 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roc/294c5d044d31567fb59b to your computer and use it in GitHub Desktop.
Save roc/294c5d044d31567fb59b to your computer and use it in GitHub Desktop.
Interactive mocha debugging
# add debugger; statement to your specific mocha test/file you are testing first
# install node-inspector
npm install -g node-inspector
# open node-inspector in separate terminal/tmux/whatever
node-inspector
# open node-inspector in a browser
open http://127.0.0.1:8080/debug?port=5858
# run mocha
mocha [whatever options you normally include] --debug-brk
# wait for ages for the inspector to load in the browser, but it will load!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment