Skip to content

Add ability to disable break on first line when using the CLI inspector #40857

Closed
@Spakman

Description

@Spakman

Is your feature request related to a problem? Please describe.
I use Node.js to run unit tests in a (Linux) shell. The way this is set up to run is to evaluate each test script as a single invocation of Node.js in series. It's working great!

However, while I do have the ability to use a debugger; statement (when I invoke each test using node inspect a_test_file.js) in these scripts to use the built-in CLI inspector, because of the forced breakpoint on the first line, the debug shell is activated for every test script, which quickly becomes tedious. I'm looking to run something like node inspect a_test_file.js and only have it bring up the debug shell if/when a debugger; statement is executed.

Describe the solution you'd like
While I do understand the need to break on the first line in many other situations, some method to disable it would be very useful in this circumstance. An environment varible or a command line argument to achieve this would both work well for me.

Describe alternatives you've considered
I'm not aware of any way to work around this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    debuggerIssues and PRs related to the debugger subsystem.feature requestIssues that request new features to be added to Node.js.inspectorIssues and PRs related to the V8 inspector protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions