Title: Feature Request: Conditional Breakpoints · Issue #883 · microsoft/vscode-python-debugger · GitHub
Open Graph Title: Feature Request: Conditional Breakpoints · Issue #883 · microsoft/vscode-python-debugger
X Title: Feature Request: Conditional Breakpoints · Issue #883 · microsoft/vscode-python-debugger
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.tags...
Open Graph 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 poi...
X 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 poi...
Opengraph URL: https://github.com/microsoft/vscode-python-debugger/issues/883
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature Request: Conditional Breakpoints","articleBody":"## Motivation ##\n\nFor efficient debugging, I very often need to have a break-point trigger only under certain circumstances.\n\nConsider the following setup\n\n\u003cimg width=\"901\" height=\"883\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/704dda12-3849-4b0b-a738-3fe913197fb0\" /\u003e\n\nhere I may for example only wish for the break point to trigger if\n\n```py\n\"advanced\" in case.tags\n```\n\nholds.\n\n## Current workaround ##\n\nCurrently, I can achieve this, but only by rewriting the code as a workaround:\n\n\u003cimg width=\"897\" height=\"891\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/21cd0cca-1694-4850-8fd8-cc0e01ded6b6\" /\u003e\n\n## Proposal ##\n\nThe workaround is clearly clumsy, esp. as it means injecting code into ones codebase, which is en par with adding print statements everywhere.\n\nWhat would be much more ideal would be one could simply add _dynamic_ trigger-conditions to the break points.[^trigger]\n\nFor example in the UI would could add a right-click menu to the individual break points \u003e _add conditions_ \u003e `user entry of boolean expression`:\n\n\u003cimg width=\"901\" height=\"883\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1c16f6df-9b13-4fda-8c9c-dbb09a51fd2e\" /\u003e\n\nHere one could consider the cases\n\n| checkbox | trigger condition | behaviour |\n| :------: | :---------------- | :-------- |\n| ☐ | * | never triggers |\n| ✅ | (empty) | always triggers |\n| ✅ | cannot be evaluated | never triggers |\n| ✅ | can be evaluated and evaluates to `true` | triggers in the given instance |\n| ✅ | can be evaluated and evaluates to `false` | does not trigger in the given instance |\n\n---\n\n[^trigger]: currently they can only _statically_ be toggled.","author":{"url":"https://github.com/raj-open","@type":"Person","name":"raj-open"},"datePublished":"2025-12-03T13:07:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/883/vscode-python-debugger/issues/883"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e3c0e2a3-d6be-b6bf-17de-c8678b433114 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 89FA:2CAFF2:12A15E:19D559:69811627 |
| html-safe-nonce | a104eea67ff6ebd6d3b4f6188eb0d488e19bdff5e15dc4d986f80ef85b5d3b3e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUZBOjJDQUZGMjoxMkExNUU6MTlENTU5OjY5ODExNjI3IiwidmlzaXRvcl9pZCI6IjE3MzY4MzQyNDA0MzgwMDEwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 458570f4e38bcbc6be420a64e7ec3d193d5bdf3434b788317422c2f0fce50b85 |
| hovercard-subject-tag | issue:3690171104 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/vscode-python-debugger/883/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c897841b80f058211527749f72ee2301a9d56b3aaa959515d356154ae38f454a/microsoft/vscode-python-debugger/issues/883 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c897841b80f058211527749f72ee2301a9d56b3aaa959515d356154ae38f454a/microsoft/vscode-python-debugger/issues/883 |
| og:image:alt | 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 poi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | raj-open |
| hostname | github.com |
| expected-hostname | github.com |
| None | 39fe8101494cbb823c09b619b68c80cd4d05ab7279997038dbe06bb91608abe1 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-python-debugger git https://github.com/microsoft/vscode-python-debugger.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 615045081 |
| octolytics-dimension-repository_nwo | microsoft/vscode-python-debugger |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 615045081 |
| octolytics-dimension-repository_network_root_nwo | microsoft/vscode-python-debugger |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d5b34a4e4898b066c629879feb4b184bc471d6a7 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width