Your package.json that has the following lines:
scripts: { "mocha": "mocha" }
nodejs v6.3.0 and mocha v3.1.0
v6.3.0
v3.1.0
you can use V8 inspector integration
--inspect activates V8 inspector integration
--inspect
--debug-brk adds a breakpoint at the beginning
--debug-brk
You can run: npm run mocha -- --inspect --debug-brk
npm run mocha -- --inspect --debug-brk
nodejs v7.6.0 and mocha v3.3.0
v7.6.0
v3.3.0
You can run: npm run mocha -- --inspect-brk
npm run mocha -- --inspect-brk
--inspect-brk is a shorthand for --inspect --debug-brk
--inspect-brk
https://stackoverflow.com/questions/14352608/whats-the-right-way-to-enable-the-node-debugger-with-mochas-debug-brk-switch#answer-39901169arrow-up-right
Last updated 7 years ago