Edit, years later: the shortest path in Node 6+ is: mocha --debug-brk --inspect ./test.js coupled with the Node Inspector Manager plugin.
Many weeks later, no answers. Here’s the quickest path that I found.
- write mocha tests
- install
node-inspector - start
node-inspector— it will now be listening on 5858 - start the mocha test with
--debug-brk - at this point the mocha test is paused on the first line
- open a web browser and go to localhost:5858
- (optional: add a debugger line at the top of your test file, set breakpoints after it stops in that file)
- hit F10 to get the code to go
- node-inspector will stop on any line that has
debuggeron it. Occasionally it won’t move the code file’s window to the right place, so you’ll have to hit F10 to get it to step to the next line and show where it’s at in the file.
Command line:
node-inspector & mocha --compilers coffee:coffee-script/register ./test/appTests.coffee --ui bdd -d -g "should X then Y" --debug-brk