Files
vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.ts
T
Connor Peet 84fe6dc3f4 fix: add an option to stopAll in compound launch configs (#98206)
* fix: add an option to stopAll in compound launch configs

* fixup! pr comments
2020-05-20 09:38:48 -07:00

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();
}
}
}