OSX
$ node --version
v11.11.0
$ ./node_modules/.bin/bmocha --version
2.1.0
For debugging with Chrome Devtools, I think that it may be more useful in practice to replace debug and inspect with debug-brk and inspect-brk so that when running bmocha -d, the debugger pauses before running through all the tests. It seems to ignore my debugger statements when using inspect (the spawned process receives --inspect), but I can successfully open up the Chrome debugger and it stops at my debugger statements if I replace inspect with inspect-brk so that --inspect-brk is passed to the spawned process.
|
const INSPECT = version >= 0x080000 ? 'inspect' : 'debug'; |
|
const DEBUG = version >= 0x080000 ? 'debug' : 'inspect'; |
Simply making that change at the lines above breaks the normal debug argument. The Chrome debugger is a really nice tool but using the CLI debugger works well too
OSX
For debugging with Chrome Devtools, I think that it may be more useful in practice to replace
debugandinspectwithdebug-brkandinspect-brkso that when runningbmocha -d, the debugger pauses before running through all the tests. It seems to ignore mydebuggerstatements when usinginspect(the spawned process receives--inspect), but I can successfully open up the Chrome debugger and it stops at mydebuggerstatements if I replaceinspectwithinspect-brkso that--inspect-brkis passed to the spawned process.bmocha/bin/bmocha
Lines 19 to 20 in fa38810
Simply making that change at the lines above breaks the normal
debugargument. The Chrome debugger is a really nice tool but using the CLI debugger works well too