Skip to content

Debugger isn't stopped at the debugger; statement when debugging using --inspect #30911

@arcanis

Description

@arcanis

Note: previous thread was #10457, but it got closed recommending --inspect-brk which is more a workaround than a solution imo.

Is your feature request related to a problem? Please describe.

When debugging a CLI program, I want to break at a specific location. For DevX reasons I don't want to use --inspect-brk, as it would require me to attach the debugger before even knowing whether the codepath covered by the breakpoint is hit - which is particularly cumbersome when using nested processes (with --inspect-port=0).

Describe the solution you'd like

I'd like debugger; statements to pause the execution even if a debugger isn't attached yet; I'd then attach it myself.

Describe alternatives you've considered

Pausing the process manually using execSync w/ sleep or similar doesn't work: the debugger doesn't see the Node process. I suspect an internal integration is required for the process to answer the debugger during a synchronous call?

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions