microsoft / microsoft/vscode-python-debugger
Feature Request: Conditional Breakpoints
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 180
- Fork
- 126
- Merge medio
- 2g 3h
- PR unite (30g)
- 3
Descrizione
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.tags
holds.
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.[^trigger]
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 |
[^trigger]: currently they can only statically be toggled.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Nell’issue non sono indicati file, test o punti di ingresso. Inizia tracciando come vengono gestiti lo stato e la valutazione dei breakpoint nel debugger Python; done deve coprire i casi di UI e comportamento elencati per condizioni vuote, non valide, true e false.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, typescript, vscode
- Ambito
- devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100