I'm building a mocha test in coffeescript. Right at the top of the test I have:
ss = new TheObject()
mocha --compilers coffee:coffee-script ./test/theObjectTests.coffee --ui bdd -d --debug-brk
"C:\Program Files\nodejs\node.exe" --debug-brk=64232 C:\Users\jcollum\AppData\Roaming\npm\_mocha
Edit, years later: the shortest path in Node 6+ probably involves the
--inspect flag from the command line. I'll update this if I go back to mocha tests
Many weeks later, no answers. Here's the quickest path that I found.
node-inspector-- it will now be listening on 5858
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.
node-inspector & mocha --compilers coffee:coffee-script/register ./test/appTests.coffee --ui bdd -d -g "should X then Y" --debug-brk