-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
As a user I want to be able to set the exception type for exception breakpoints #11552
Comments
Currently our debug protocl supports that the vscode frontend can send exception filters to the backend. However the SetExceptionBreakpointsResponse would have to somehow notify vscode if an exception breakpoint is accepted or not. For instance a user could try to add a ClassCastException while debugging node and the vscode frontend would need to notify the user that this is ilegal. Assigning first to @weinand to assess on this feature request. |
+1 |
The corresponding protocol addition is microsoft/vscode-debugadapter-node/issues/64 |
@indiejames so your proposal would be this:
In microsoft/vscode-debugadapter-node#64 it was proposed to support the following configuration options for an exception breakpoint:
Do these options make sense for you? Which options could your debugger support? |
@indiejames any comments to my last comment? |
We've added support for exception configuration to the debug protocol (microsoft/vscode-debugadapter-node#64). |
@weinand Sorry, I didn't see your comments earlier. I think those options look good. I think all of those options apply to me except "unhandled". The REPL I execute code in always traps exceptions at the top level, so there are no "unhandled" exceptions. I'm not sure if I can trigger an event when that happens or not. For now these look good to me. |
@indiejames Please see what I was able to do in the mono-debug extension without touching anything in VS Code itself: The code is here |
@weinand That looks pretty good. I like the search completion to find the desired exception class. What is displayed in the Breakpoints pane of the Debug viewlet? |
@indiejames these exception configurations don't show up in the breakpoints pane (because the UI would would not scale if you have lots of exceptions and because there is no API for adding them to the breakpoints pane). The exception configurations are managed completely independent from VS Code breakpoints in "settings" (user or workspace). |
Currently the exception breakpoint settings apply to all types of exceptions. In many languages such as Clojure/Java, there is a hierarchy of exception classes and it is convenient to only break on specific exception types. For instance if I see an exception caused by a ClassCastException I want to be able to set a breakpoint that will only trigger for ClassCastExceptions.
I think this would merely entail an input text box for typing the class to associate with a particular breakpoint, and this could be enabled only for debug adapters that report the capability to break on specific exception types.
The text was updated successfully, but these errors were encountered: