Skip to content

bmocha -d Flag #7

@tynes

Description

@tynes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions