-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add condition editing UI to breakpoint filters #111227
Comments
@weinand this proposal makes sense to me. If we do this for exception breakpoint I would do 100% the same UI for Function breakpoint conditions. Maybe @connor4312 has an idea for the UI I will have time this week, and once we settle on the UI I can look into adding it on Wed / Thu / Fri, thus assigning to November and we can always push back if we do not find enough time. |
@isidorn I've added support for exception filter conditions in Mock Debug |
@weinand great, thanks! |
@weinand started looking into this. One question:
|
@weinand |
@isidorn thanks for feedback.
|
|
@weinand is there some difference between sending |
@isidorn just omit the property |
@isidorn After contemplating about the If simplifies the way clients have to call |
@weinand makes sense. We can keep it. I have pushed a first version of this. I have tried this out with the Mock debug and seems to work fine. |
fyi @connor4312 not sure if js-debug could support this already |
Since @connor4312 asked for the original DAP feature (microsoft/debug-adapter-protocol#137), he probably has a use case in mind that we could use in the test plan. |
That would be awesome. For now I created an empty template for the testplan item and I can fill it on Monday. |
I'm on vacation next week so unfortunately won't be around to test this |
@connor4312 thanks for letting us know. Have a nice vacation and we can test this with mock debug |
I've now implemented this in js-debug 🙂 |
@connor4312 awesome! |
With microsoft/debug-adapter-protocol#137 "condition" support has arrived in the Debug Adapter Protocol.
This feature requests asks for adding condition editing UI for breakpoint filters.
Implementation sketch:
supportsExceptionFilterOptions
it will use the new protocolexceptionBreakpointFilters
capability can now return asupportsCondition
property which indicates that VS Code should enable a "condition" edit UI for the exception filter.setExceptionBreakpoints
request the set of exceptions must be passed via thefilterOptions
property instead of thefilters
property. ThefilterOptions
property takes an array of pairs consisting of the breakpoint filter ID and an optional condition. If none of the exception filters has a condition, thefilters
property can be used.Proposal for condition editing UI:
The simplest "condition" edit UI would be to provide a context menu action that opens an editable text box on top the exception filters name (identical to the function breakpoints, see green arrow below). If an exception filter has a condition, it could be rendered at the end of the exception's name in a dimmed style (similar to the path style that we use for regular breakpoints; see red arrow):
/cc @connor4312
The text was updated successfully, but these errors were encountered: