-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No longer possible to debug mocha tests #170
Comments
Spawning Mocha had to be done as the previous way just caused too many issues and the Mocha programmatic API is completely broken. This is indeed one of the downsides of spawning. To debug a single test file you could use the |
It is almost impossible to use code coverage since 4.0 |
Hi @FredrikFolkesson , the arguments are forwarded to the mocha process (https://github.com/sindresorhus/gulp-mocha/blob/master/index.js#L53), so you just have to pass
|
I enabled debugging by adding const mocha = require('gulp-mocha'),
// other code goes here
.pipe(mocha({
// other settings go here
'inspect-brk': true
})); Since I'm using Rider, I followed these instructions to attach to the debug session: Note that the approach above should work with WebStorm and other IntelliJ base IDEs. |
Since gulp-mocha now spawns a new process running mocha we can no longer use the debugger to set breakpoints in our test code and then run the gulp task that runs our unit tests. (the process we attach to that runs gulp and gulp-mocha is not the one where the tests actually runs anymore since a new process is spawned to run mocha)
Is this something that will be fixed or will tests run by gulp-mocha not be debuggable anymore?
The text was updated successfully, but these errors were encountered: