-
Notifications
You must be signed in to change notification settings - Fork 133
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
Suggestions on new conditional exception protocol #164
Comments
@gregg-miskelly thanks for the feedback! I've tried to address the first item by explaining what to do for invalid exception filters: /** SetExceptionBreakpoints request; value of command field is 'setExceptionBreakpoints'.
The request configures the debuggers response to thrown exceptions.
If an exception is configured to break, a 'stopped' event is fired (with reason 'exception').
Clients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.
If a filter or filter option is invalid (e.g. due to an invalid 'condition'),
the request should fail with an 'ErrorResponse' explaining the problem(s).
*/
export interface SetExceptionBreakpointsRequest extends Request {
// command: 'setExceptionBreakpoints';
arguments: SetExceptionBreakpointsArguments;
} For the second item I've added a new /** An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with. */
export interface ExceptionBreakpointsFilter {
/** The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request. */
filter: string;
/** The name of the filter option. This will be shown in the UI. */
label: string;
/** An optional help text providing additional information like the condition's syntax.
This string is typically shown in the UI as a hover and must be translated. */
description?: string;
/** Initial value of the filter option. If not specified a value 'false' is assumed. */
default?: boolean;
/** Controls whether a condition can be specified for this filter option.
If false or missing, a condition can not be set. */
supportsCondition?: boolean;
} @gregg-miskelly @isidorn @connor4312 I'd appreciate your feedback |
@weinand this makes sense to me. However another place in the UI which we should consider to allow debug adapters to contribute to is the placeholder text for the exception breakpoint conditions. I am not sure if C# would potentially want to customise this text. But I think this placeholder text is more easily seen than the hover. |
@gregg-miskelly what's your take on Isi's suggestion? |
I agree on the placeholder text, and I think the placeholder supersedes the need for a 'default'. There's no sensible default I think debuggers would show there: the user just took an action to supply their own condition, and as a debugger I have no idea what it will be. |
Place holder text sounds does sound very useful. But I think a hover text would still be nice so we can link to complete documentation. |
Thanks for the feedback. @connor4312 what do you mean by 'default'? |
Since the term "placeholder" is not used in DAP, I've decided to use /** An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with. */
export interface ExceptionBreakpointsFilter {
/** The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request. */
filter: string;
/** The name of the filter option. This will be shown in the UI. */
label: string;
/** An optional help text providing additional information about the exception filter.
This string is typically shown as a hover and must be translated. */
description?: string;
/** Initial value of the filter option. If not specified a value 'false' is assumed. */
default?: boolean;
/** Controls whether a condition can be specified for this filter option.
If false or missing, a condition can not be set. */
supportsCondition?: boolean;
/** An optional help text providing information about the condition.
This string is shown as the placeholder text for a text box and must be translated. */
conditionDescription?: string;
} @gregg-miskelly @isidorn @connor4312 |
I was looking at the new support for conditional exceptions and I have two suggestions:
ExceptionBreakpointsFilter
had an additional optionaldescription
field that would be displayed in a datatip similar to the experience of edited launch.json in VS Code. This would allow a debug adapter to provide examples and link to complete documentation.The text was updated successfully, but these errors were encountered: