mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-25 09:06:21 +01:00
* fix: add an option to stopAll in compound launch configs * fixup! pr comments
21 lines
705 B
TypeScript
21 lines
705 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { Emitter } from 'vs/base/common/event';
|
|
|
|
export class DebugCompoundRoot {
|
|
private stopped = false;
|
|
private stopEmitter = new Emitter<void>();
|
|
|
|
onDidSessionStop = this.stopEmitter.event;
|
|
|
|
sessionStopped(): void {
|
|
if (!this.stopped) { // avoid sending extranous terminate events
|
|
this.stopped = true;
|
|
this.stopEmitter.fire();
|
|
}
|
|
}
|
|
}
|