@@ -110,25 +110,28 @@ export class BreakpointsView extends ViewPane {
110110
111111 this . _register ( this . list . onContextMenu ( this . onListContextMenu , this ) ) ;
112112
113+ this . list . onMouseMiddleClick ( async ( { element } ) => {
114+ if ( element instanceof Breakpoint ) {
115+ await this . debugService . removeBreakpoints ( element . getId ( ) ) ;
116+ } else if ( element instanceof FunctionBreakpoint ) {
117+ await this . debugService . removeFunctionBreakpoints ( element . getId ( ) ) ;
118+ } else if ( element instanceof DataBreakpoint ) {
119+ await this . debugService . removeDataBreakpoints ( element . getId ( ) ) ;
120+ }
121+ } ) ;
122+
113123 const resourceNavigator = this . _register ( new ListResourceNavigator ( this . list , { configurationService : this . configurationService } ) ) ;
114124 this . _register ( resourceNavigator . onDidOpen ( async e => {
115- if ( ! e . element ) {
125+ if ( e . element === null ) {
116126 return ;
117127 }
118128
119- const element = this . list . element ( e . element ) ;
120-
121129 if ( e . browserEvent instanceof MouseEvent && e . browserEvent . button === 1 ) { // middle click
122- if ( element instanceof Breakpoint ) {
123- await this . debugService . removeBreakpoints ( element . getId ( ) ) ;
124- } else if ( element instanceof FunctionBreakpoint ) {
125- await this . debugService . removeFunctionBreakpoints ( element . getId ( ) ) ;
126- } else if ( element instanceof DataBreakpoint ) {
127- await this . debugService . removeDataBreakpoints ( element . getId ( ) ) ;
128- }
129130 return ;
130131 }
131132
133+ const element = this . list . element ( e . element ) ;
134+
132135 if ( element instanceof Breakpoint ) {
133136 openBreakpointSource ( element , e . sideBySide , e . editorOptions . preserveFocus || false , this . debugService , this . editorService ) ;
134137 }
0 commit comments