diff --git a/packages/debug/src/browser/breakpoint/breakpoint-manager.ts b/packages/debug/src/browser/breakpoint/breakpoint-manager.ts index f13006c8fb008..144036ea16d49 100644 --- a/packages/debug/src/browser/breakpoint/breakpoint-manager.ts +++ b/packages/debug/src/browser/breakpoint/breakpoint-manager.ts @@ -78,7 +78,7 @@ export class BreakpointsManager implements FrontendApplicationContribution { * @param editor the active text editor * @param position the mouse position in the editor */ - toggleBreakpoint(editor: TextEditor, position: Position): void { + async toggleBreakpoint(editor: TextEditor, position: Position): Promise { const debugSession = this.debugSessionManager.getActiveDebugSession(); const srcBreakpoint = this.createSourceBreakpoint(debugSession, editor, position); @@ -92,7 +92,7 @@ export class BreakpointsManager implements FrontendApplicationContribution { if (debugSession) { const source = DebugUtils.toSource(editor.uri, debugSession); - this.breakpointApplier.applySessionBreakpoints(debugSession, source); + await this.breakpointApplier.applySessionBreakpoints(debugSession, source); } this.breakpointDecorator.applyDecorations(editor); @@ -103,14 +103,14 @@ export class BreakpointsManager implements FrontendApplicationContribution { * Returns all breakpoints for the given debug session. * @param sessionId the debug session identifier */ - get(sessionId: string | undefined): ExtDebugProtocol.AggregatedBreakpoint[] { + async get(sessionId: string | undefined): Promise { return this.breakpointStorage.get().filter(b => b.sessionId === sessionId); } /** * Returns all breakpoints. */ - getAll(): ExtDebugProtocol.AggregatedBreakpoint[] { + async getAll(): Promise { return this.breakpointStorage.get(); } @@ -255,7 +255,7 @@ export class BreakpointsManager implements FrontendApplicationContribution { debugSession.stacks(args).then(response => { const frame = response.body.stackFrames[0]; if (frame) { - this.sourceOpener.open(frame).then(widget => this.lineDecorator.applyDecorations()); + this.sourceOpener.open(frame).then(() => this.lineDecorator.applyDecorations()); } }); } diff --git a/packages/debug/src/browser/debug-utils.ts b/packages/debug/src/browser/debug-utils.ts index a9ea461389bc8..5e47975f25dde 100644 --- a/packages/debug/src/browser/debug-utils.ts +++ b/packages/debug/src/browser/debug-utils.ts @@ -26,7 +26,7 @@ import { DebugSession } from './debug-model'; export class SourceOpener { constructor(@inject(EditorManager) protected readonly editorManager: EditorManager) { } - async open(frame: DebugProtocol.StackFrame): Promise { + open(frame: DebugProtocol.StackFrame): Promise { if (!frame.source) { return Promise.reject(`The source '${frame.name}' to open is not specified.`); } diff --git a/packages/debug/src/browser/view/debug-breakpoints-widget.ts b/packages/debug/src/browser/view/debug-breakpoints-widget.ts index 0b37062d4b588..8a90896be6a3e 100644 --- a/packages/debug/src/browser/view/debug-breakpoints-widget.ts +++ b/packages/debug/src/browser/view/debug-breakpoints-widget.ts @@ -62,11 +62,11 @@ export class DebugBreakpointsWidget extends VirtualWidget { return this.onDidDblClickBreakpointEmitter.event; } - refreshBreakpoints(): void { + async refreshBreakpoints(): Promise { if (this.debugSession) { - this.breakpoints = this.breakpointManager.get(this.debugSession.sessionId); + this.breakpoints = await this.breakpointManager.get(this.debugSession.sessionId); } else { - this.breakpoints = this.breakpointManager.getAll(); + this.breakpoints = await this.breakpointManager.getAll(); } super.update(); }