MCPcopy
hub / github.com/microsoft/vscode-js-debug / CascadeTerminationTracker

Class CascadeTerminationTracker

src/ui/cascadeTerminateTracker.ts:15–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 */
14@injectable()
15export class CascadeTerminationTracker implements IExtensionContribution {
16 constructor(@inject(DebugSessionTracker) private readonly tracker: DebugSessionTracker) {}
17
18 /**
19 * Registers the tracker for the extension.
20 */
21 public register(context: vscode.ExtensionContext) {
22 context.subscriptions.push(
23 this.tracker.onSessionEnded(session => {
24 const targets: string[] = session.configuration.cascadeTerminateToConfigurations;
25 if (!targets || !(targets instanceof Array)) {
26 return; // may be a nested session
27 }
28
29 for (const configName of targets) {
30 for (const session of this.tracker.getByName(configName)) {
31 vscode.debug.stopDebugging(session);
32 }
33 }
34 }),
35 );
36 }
37}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected