|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information.
|
4 | 4 | *--------------------------------------------------------------------------------------------*/
|
5 | 5 |
|
6 |
| -import { mainWindow } from 'vs/base/browser/window'; |
7 | 6 | import * as aria from 'vs/base/browser/ui/aria/aria';
|
8 | 7 | import { distinct } from 'vs/base/common/arrays';
|
9 | 8 | import { Queue, RunOnceScheduler } from 'vs/base/common/async';
|
@@ -40,6 +39,8 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/
|
40 | 39 | import { IHostService } from 'vs/workbench/services/host/browser/host';
|
41 | 40 | import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle';
|
42 | 41 | 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'; |
43 | 44 |
|
44 | 45 | export class DebugSession implements IDebugSession, IDisposable {
|
45 | 46 | parentSession: IDebugSession | undefined;
|
@@ -1018,7 +1019,7 @@ export class DebugSession implements IDebugSession, IDisposable {
|
1018 | 1019 | await this.paneCompositeService.openPaneComposite(VIEWLET_ID, ViewContainerLocation.Sidebar);
|
1019 | 1020 | }
|
1020 | 1021 |
|
1021 |
| - if (this.configurationService.getValue<IDebugConfiguration>('debug').focusWindowOnBreak && !this.workbenchEnvironmentService.extensionTestsLocationURI) { |
| 1022 | + if (this.configurationService.getValue<IDebugConfiguration>('debug').focusWindowOnBreak && !this.workbenchEnvironmentService.extensionTestsLocationURI && !getActiveWindow()) { |
1022 | 1023 | await this.hostService.focus(mainWindow, { force: true /* Application may not be active */ });
|
1023 | 1024 | }
|
1024 | 1025 | }
|
|
0 commit comments