diff --git a/src/vs/workbench/contrib/debug/browser/debug.contribution.ts b/src/vs/workbench/contrib/debug/browser/debug.contribution.ts index 2dba9e15aa9..8452fe66007 100644 --- a/src/vs/workbench/contrib/debug/browser/debug.contribution.ts +++ b/src/vs/workbench/contrib/debug/browser/debug.contribution.ts @@ -378,7 +378,7 @@ viewsRegistry.registerViews([{ id: BREAKPOINTS_VIEW_ID, name: nls.localize('brea viewsRegistry.registerViews([{ id: WelcomeView.ID, name: WelcomeView.LABEL, containerIcon: icons.runViewIcon, ctorDescriptor: new SyncDescriptor(WelcomeView), order: 1, weight: 40, canToggleVisibility: true, when: CONTEXT_DEBUG_UX.isEqualTo('simple') }], viewContainer); viewsRegistry.registerViews([{ id: LOADED_SCRIPTS_VIEW_ID, name: nls.localize('loadedScripts', "Loaded Scripts"), containerIcon: icons.loadedScriptsViewIcon, ctorDescriptor: new SyncDescriptor(LoadedScriptsView), order: 35, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: true, when: ContextKeyExpr.and(CONTEXT_LOADED_SCRIPTS_SUPPORTED, CONTEXT_DEBUG_UX.isEqualTo('default')) }], viewContainer); -// Register disassembly editor +// Register disassembly view Registry.as(EditorExtensions.EditorPane).registerEditorPane( EditorPaneDescriptor.create(DisassemblyView, DISASSEMBLY_VIEW_ID, nls.localize('disassembly', "Disassembly")), diff --git a/src/vs/workbench/contrib/debug/browser/debugService.ts b/src/vs/workbench/contrib/debug/browser/debugService.ts index d4f9d696401..5e3c5cad6ab 100644 --- a/src/vs/workbench/contrib/debug/browser/debugService.ts +++ b/src/vs/workbench/contrib/debug/browser/debugService.ts @@ -1012,26 +1012,6 @@ export class DebugService implements IDebugService { await this.sendExceptionBreakpoints(session); } - async getDisassemble(offset: number, instructionOffset: number, instructionCount: number): Promise { - const session = this.getViewModel().focusedSession; - if (session) { - const frame = this.getViewModel().focusedStackFrame; - if (frame?.instructionPointerReference) { - return session.disassemble(frame?.instructionPointerReference, offset, instructionOffset, instructionCount); - } - } - - return new Promise((resolve, reject) => { - const result: DebugProtocol.DisassembledInstruction[] = []; - - for (let i = 0; i < instructionCount; i++) { - result.push({ address: `${i + offset}`, instruction: `debugger is not available.` }); - } - - resolve(result); - }); - } - private async sendBreakpoints(modelUri: uri, sourceModified = false, session?: IDebugSession): Promise { const breakpointsToSend = this.model.getBreakpoints({ uri: modelUri, enabledOnly: true }); await sendToOneOrAllSessions(this.model, session, s => s.sendBreakpoints(modelUri, breakpointsToSend, sourceModified)); diff --git a/src/vs/workbench/contrib/debug/common/debug.ts b/src/vs/workbench/contrib/debug/common/debug.ts index 0043e77644f..db5b7b8b6cb 100644 --- a/src/vs/workbench/contrib/debug/common/debug.ts +++ b/src/vs/workbench/contrib/debug/common/debug.ts @@ -906,6 +906,7 @@ export interface IDebugService { /** * Removes all instruction breakpoints. If address is passed only removes the instruction breakpoint with the passed address. + * The address should be the address string supplied by the debugger from the "Disassemble" request. * Notifies debug adapter of breakpoint changes. */ removeInstructionBreakpoints(address?: string): Promise; @@ -965,8 +966,6 @@ export interface IDebugService { */ sourceIsNotAvailable(uri: uri): void; - getDisassemble(offset: number, instructionOffset: number, instructionCount: number): Promise; - /** * Gets the current debug model. */ diff --git a/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts b/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts index 688b6cbb71b..c507e2caf52 100644 --- a/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts +++ b/src/vs/workbench/contrib/debug/test/browser/mockDebug.ts @@ -157,10 +157,6 @@ export class MockDebugService implements IDebugService { throw new Error('not implemented'); } - getDisassemble(offset: number, instructionOffset: number, instructionCount: number): Promise { - throw new Error('not implemented'); - } - logToRepl(session: IDebugSession, value: string): void { } sourceIsNotAvailable(uri: uri): void { }