Skip to content

Commit a3d5787

Browse files
authored
Aux window: window focus change when stepping through code (fix microsoft#199257) (microsoft#199263)
1 parent 44567a1 commit a3d5787

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/contrib/debug/browser/debugSession.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { mainWindow } from 'vs/base/browser/window';
76
import * as aria from 'vs/base/browser/ui/aria/aria';
87
import { distinct } from 'vs/base/common/arrays';
98
import { Queue, RunOnceScheduler } from 'vs/base/common/async';
@@ -40,6 +39,8 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/
4039
import { IHostService } from 'vs/workbench/services/host/browser/host';
4140
import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
4241
import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
42+
import { getActiveWindow } from 'vs/base/browser/dom';
43+
import { mainWindow } from 'vs/base/browser/window';
4344

4445
export class DebugSession implements IDebugSession, IDisposable {
4546
parentSession: IDebugSession | undefined;
@@ -1018,7 +1019,7 @@ export class DebugSession implements IDebugSession, IDisposable {
10181019
await this.paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar);
10191020
}
10201021

1021-
if (this.configurationService.getValue<IDebugConfiguration>('debug').focusWindowOnBreak && !this.workbenchEnvironmentService.extensionTestsLocationURI) {
1022+
if (this.configurationService.getValue<IDebugConfiguration>('debug').focusWindowOnBreak && !this.workbenchEnvironmentService.extensionTestsLocationURI && !getActiveWindow()) {
10221023
await this.hostService.focus(mainWindow, { force: true /* Application may not be active */ });
10231024
}
10241025
}

0 commit comments

Comments
 (0)