mocha coffeescript debuggin'

So, that is the question, may I debug mocha tests in webstorm 9? I am setting breakpoints but the debug is just a run; I have to first compile CS to JS and then debug the latter.
The procedure I am doing is, as usual, set the configuration run to Mocha and with the Extra Mocha options set to '--compilers coffee:coffee-script/register'.

Cheers in advance


Comment actions Permalink

Does Mocha generate sourcemap when being run with '--compilers coffee:coffee-script/register'? If it does, debugging should work. Otherwise, the only option is using a file watcher to compile coffeescript and then run Mocha tests against the generated js files

Comment actions Permalink

After googling a bit, Mocha doesn't generate source maps. Ultimately, I found out that setting a breakpoint in the generated javascript kind of activate the breakpoints in the original CS file... If you know that, it is bearable IMHO.

I dunno if your builds are bit of different for different OS, I am using OSX 10.9.5 BTW, node 0.10.20, coffeescript 1.8.0.



Please sign in to leave a comment.