Skip to content

Commit 8f023e4

Browse files
authored
Use preserveFocus when focusing stack frames (microsoft#251964)
* Use preserveFocus when focusing stack frames * Add preserveFocus in openEditor call for disassembly view
1 parent 49e7cf8 commit 8f023e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/vs/workbench/contrib/debug/common/debugModel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ export class StackFrame implements IStackFrame {
542542
async openInEditor(editorService: IEditorService, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): Promise<IEditorPane | undefined> {
543543
const threadStopReason = this.thread.stoppedDetails?.reason;
544544
if (this.instructionPointerReference &&
545-
(threadStopReason === 'instruction breakpoint' ||
546-
(threadStopReason === 'step' && this.thread.lastSteppingGranularity === 'instruction') ||
545+
((threadStopReason === 'instruction breakpoint' && !preserveFocus) ||
546+
(threadStopReason === 'step' && this.thread.lastSteppingGranularity === 'instruction' && !preserveFocus) ||
547547
editorService.activeEditor instanceof DisassemblyViewInput)) {
548-
return editorService.openEditor(DisassemblyViewInput.instance, { pinned: true, revealIfOpened: true });
548+
return editorService.openEditor(DisassemblyViewInput.instance, { pinned: true, revealIfOpened: true, preserveFocus });
549549
}
550550

551551
if (this.source.available) {

0 commit comments

Comments
 (0)