-
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
VS Code doesn't display error response from invalid exception filter conditions #117789
Comments
CC @isidorn |
Showing the error via notification is easy but I think it is visually far away from breakpoints. It is in the right corner, while breakpoints are usually in the left. Same as unbound breakpoint I suggest to simply render this in the breakpoints view. We can render the exception as "not verified" which means grayed out and on hover to show the message. Let me know what you think fyi @weinand @connor4312 |
Sounds good to me. |
A warning icon would work well. For normal breakpoint I think I manually create a console |
Ok, assigning to March, I will render this somehow in the Breakpoints view. Will post here. |
@gregg-miskelly I just noticed that in your error response you give a message specific to one exception breakpoint. However this is a Due to that I think this approach might not be the nicest. And I suggest the following:
If we combine these two, the breakpoint will be rendered as unbounded and the debug extension can choose what message to show for each breakpoint. Does this make sense? Or you prefer to have a global message for all breakpoint if the @weinand @connor4312 let me know what you think |
For C#, I think it would be good enough to just handle failures from |
@gregg-miskelly okey, I was more thinking in general of invalid conditions for breakpoints. So if we introduce a new invalid condition event it should cover all breakpoints, not only exception breakpoints. But if we want to solve this only for exception breakpoints, I do not mind just showing the message from the exception breakpoints response on each exception breakpoint. Let's see what @weinand and @connor4312 feel like. |
Yea, this is something that I also deal with manually for logpoint and conditional breakpoints. If there's a syntax error I return that specific breakpoint as being unbound and then log output to the console. A generalized fix would be preferred. I think having something in |
@connor4312 Are you reporting this error to the console in addition to a BreakpointEvent with To be clear - I think it would be great if we could use BreakpointEvent to report failures for both normal breakpoints and exception breakpoints, and if we could go back to the start of DAP and do exception filters in that way it would make sense to me. But since exception filters don't have breakpoint ids today, I feel like it doesn't quite fit. |
Yea, that's right. Simply |
Thanks for the discussion and your input! I've tried to produce a summary and proposal: There is a desire to treat all breakpoints the same. One area where this difference between breakpoints hurts a lot, is with error reporting: neither is it possible to return a "failed verification" message from IMO the cleanest approach would be to align I'd prefer the latter because I think that syntax errors in the condition are something that should be returned synchronously rather than as a async event. @gregg-miskelly @connor4312 @isidorn what do you think? |
@weinand I like both your proposals. However I prefer the second one since it is sync and does not require an introduction of an ID and thus making it simpler. |
@isidorn please note, that returning an array of breakpoints from |
That works for me. |
@weinand I see. That is still fine for me. |
I've created microsoft/debug-adapter-protocol#184 for the required DAP changes. Since that work will happen in April, I've changed the milestone for this issue too. |
@isidorn I've pushed the DAP change to VS Code. |
@weinand great, thanks a lot! |
I have implemented this and pushed to Insiders. Here's how an |
@isidorn I have been on vacation, so it will be a couple of days before I have a chance. But will do. Thanks! |
@gregg-miskelly no hurries, next week would be great (before we release). |
@isidorn Your changes worked for all the cases I can think of. Thanks for fixing this! |
Great, thanks for letting us know. Adding verified label. |
Issue Type: Bug
Expected:
VS Code should somehow tell me that I entered an invalid exception filter by displaying the text from the error response as the DAP spec indicates. My suggestion would be a warning icon next to the exception filters and display the error message as a notification.
Actual:
The error response isn't displayed anywhere.
Here is a partial protocol trace:
VS Code version: Code - Insiders 1.54.0-insider (3290f9a, 2021-02-26T05:13:29.656Z)
OS version: Windows_NT x64 10.0.19042
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: