Run node inspector with mocha
The problem was my version of mocha. I was running a version older than 3.1.0. --inspect
support was added in 3.1.0
I am now able to run with debugging with these lines:
mocha --reporter spec --inspect test.js
mocha --reporter spec --inspect-brk test.js
[DEP0062] DeprecationWarning:
node --inspect --debug-brk
is deprecated. Please usenode --inspect-brk
instead.
use in the future
mocha --reporter spec --inspect-brk test.js