How to debug Ecmascript 6 tests ?
Hi
I use the following command from the cli :
./node_modules/.bin/mocha --check-leaks --throw-deprecation --growl --recursive --compilers js:babel/register src/test/
How can I debug them using intellij 14.1.4 ?
Thanks in advance
best
请先登录再写评论。
You can do it using Mocha run configuration - see the screenshot:
Note that Mocha support is available as a part of NodeJS plugin - you need to install it using Settings/Plugins, Install JetBrains Plugin...
Hi Elena
Thanks for the help, that did it.
However, when debugging, launching the tests takes quite a while. Is there a way to make it faster ?
Thanks again
what node.js version do you use? There is a known issue with node.js > v.0.11.0 - see https://github.com/nodejs/io.js/issues/877. See https://youtrack.jetbrains.com/issue/WEB-16076#comment=27-981720 for a workaround
Well, you were right on spot, thanks a lot :)
However, while the workaround is working (debug starts fast), however I need the sourcemap... Hopefully the initial bug on V8 side is resolved soon!
thanks again