Show breakpoint widget on Alt+click in gutter#308687
Merged
roblourens merged 2 commits intomicrosoft:mainfrom Apr 10, 2026
Merged
Show breakpoint widget on Alt+click in gutter#308687roblourens merged 2 commits intomicrosoft:mainfrom
roblourens merged 2 commits intomicrosoft:mainfrom
Conversation
Add Alt+click handling in the editor gutter to quickly add or edit conditional breakpoints. When Alt+clicking on a line without breakpoints, the breakpoint widget opens in conditional breakpoint mode. When Alt+clicking on a line with existing breakpoints, the breakpoint widget opens for editing the first breakpoint. Fixes microsoft#203259
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an Alt+click interaction in the editor glyph margin to open the breakpoint widget, improving the workflow for adding conditional breakpoints and editing existing breakpoints directly from the gutter.
Changes:
- Handle Alt+click on an existing breakpoint to open the breakpoint widget for editing.
- Handle Alt+click on an empty gutter line to open the breakpoint widget preselected to “Conditional Breakpoint”.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts | Adds Alt+click mouse handling in the glyph margin to open the breakpoint widget in edit/conditional modes depending on whether breakpoints already exist on the line. |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.ts:337
- Because the
altKeycheck comes beforemiddleButton, Alt+middle-click on an empty gutter line will now open the conditional breakpoint widget instead of honoring the configureddebug.gutterMiddleClickAction. To avoid regressing middle-click behavior, consider either (1) checkingmiddleButtonfirst, or (2) requiringe.event.leftButtonfor the Alt+click path.
if (e.event.altKey) {
// Alt+click on empty gutter opens the breakpoint widget for adding a conditional breakpoint
this.showBreakpointWidget(lineNumber, undefined, BreakpointWidgetContext.CONDITION);
} else if (e.event.middleButton) {
- Files reviewed: 1/1 changed files
- Comments generated: 1
bhavyaus
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This makes it easier to add conditional breakpoints without going through the context menu, consistent with how Shift+click toggles breakpoint enable/disable and middle-click opens the breakpoint widget.
Test plan
Fixes #203259