Skip to content

feat: Add --inspect-brk-if flag for conditional debugging #58130

@devlohani99

Description

@devlohani99

Description of the problem

Currently, Node.js supports --inspect-brk which always breaks on the first line. Adding a conditional break flag would improve debugging workflows.

Proposed functionality:

node --inspect-brk-if="process.env.DEBUG === 'true'" app.js

This would only break on the first line if the condition is met, making it easier to debug specific scenarios without modifying code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions