Skip to content
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

bmocha -d Flag #7

Open
tynes opened this issue Apr 2, 2019 · 0 comments
Open

bmocha -d Flag #7

tynes opened this issue Apr 2, 2019 · 0 comments

Comments

@tynes
Copy link
Member

tynes commented Apr 2, 2019

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.

bmocha/bin/bmocha

Lines 19 to 20 in fa38810

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant