Skip to content

Commit

Permalink
Allow clicking to remove breakpoint even alongside non debug decorati…
Browse files Browse the repository at this point in the history
…ons (#180986)
  • Loading branch information
joyceerhl authored Apr 26, 2023
1 parent afe68c6 commit 0a778a5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,14 @@ export class BreakpointEditorContribution implements IBreakpointEditorContributi
}

const model = this.editor.getModel();
if (!e.target.position || !model || e.target.type !== MouseTargetType.GUTTER_GLYPH_MARGIN || e.target.detail.isAfterLines || !this.marginFreeFromNonDebugDecorations(e.target.position.lineNumber)) {
if (!e.target.position
|| !model
|| e.target.type !== MouseTargetType.GUTTER_GLYPH_MARGIN
|| e.target.detail.isAfterLines
|| !this.marginFreeFromNonDebugDecorations(e.target.position.lineNumber)
// don't return early if there's a breakpoint
&& !e.target.element?.className.includes('breakpoint')
) {
return;
}
const canSetBreakpoints = this.debugService.canSetBreakpointsIn(model);
Expand Down

0 comments on commit 0a778a5

Please sign in to comment.