Debugging Mocha
Using Node Debugger with Mocha
Assumption
Your package.json that has the following lines:
Steps
nodejs
v6.3.0
and mochav3.1.0
you can use V8 inspector integration
--inspect
activates V8 inspector integration--debug-brk
adds a breakpoint at the beginningYou can run:
npm run mocha -- --inspect --debug-brk
nodejs
v7.6.0
and mochav3.3.0
You can run:
npm run mocha -- --inspect-brk
--inspect-brk
is a shorthand for --inspect --debug-brk
References
Last updated