Skip to content

Feature Request: Conditional Breakpoints #883

@raj-open

Description

@raj-open

Motivation

For efficient debugging, I very often need to have a break-point trigger only under certain circumstances.

Consider the following setup

Image

here I may for example only wish for the break point to trigger if

"advanced" in case.tags

holds.

Current workaround

Currently, I can achieve this, but only by rewriting the code as a workaround:

Image

Proposal

The workaround is clearly clumsy, esp. as it means injecting code into ones codebase, which is en par with adding print statements everywhere.

What would be much more ideal would be one could simply add dynamic trigger-conditions to the break points.1

For example in the UI would could add a right-click menu to the individual break points > add conditions > user entry of boolean expression:

Image

Here one could consider the cases

checkbox trigger condition behaviour
* never triggers
(empty) always triggers
cannot be evaluated never triggers
can be evaluated and evaluates to true triggers in the given instance
can be evaluated and evaluates to false does not trigger in the given instance

Footnotes

  1. currently they can only statically be toggled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededNeeds assignment to the proper sub-team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions