-
Notifications
You must be signed in to change notification settings - Fork 78
Description
Motivation
For efficient debugging, I very often need to have a break-point trigger only under certain circumstances.
Consider the following setup
here I may for example only wish for the break point to trigger if
"advanced" in case.tagsholds.
Current workaround
Currently, I can achieve this, but only by rewriting the code as a workaround:
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:
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
-
currently they can only statically be toggled. ↩