Skip to content
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

Only call setExceptionBreakpoints as specified #90001

Closed
weinand opened this issue Feb 4, 2020 · 0 comments
Closed

Only call setExceptionBreakpoints as specified #90001

weinand opened this issue Feb 4, 2020 · 0 comments
Assignees
Labels
debt Code quality issues debug Debug viewlet, configurations, breakpoints, adapter issues
Milestone

Comments

@weinand
Copy link
Contributor

weinand commented Feb 4, 2020

The DAP spec says:

frontend sends a setExceptionBreakpoints request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)

Today we seem to call setExceptionBreakpoints always, even if no exceptionBreakpointFilters have been defined.

We should fix this with this logic:

const c: Capabilities = capabilities;
if (c.supportsConfigurationDoneRequest) {
    // newer DAP version with supportsConfigurationDoneRequest
    if (c.exceptionBreakpointFilters && c.exceptionBreakpointFilters.length > 0) {
		setExceptionBreakpoints(...);
    } else {
	    // new behavior: do not call setExceptionBreakpoints
	}
} else {
   	// old DAP version without supportsConfigurationDoneRequest
    // (old clients are relying on setExceptionBreakpoints being always called)
	setExceptionBreakpoints(...);
}
@weinand weinand added debug Debug viewlet, configurations, breakpoints, adapter issues debt Code quality issues labels Feb 4, 2020
@weinand weinand added this to the February 2020 milestone Feb 4, 2020
@isidorn isidorn closed this as completed in 4be43b9 Feb 7, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

2 participants