Skip to content

Commit e6d768c

Browse files
committed
Add stopDebugger notification
Used to indicate the PowerShell debugger has stopped and so the connected debugger interface in the extension should also stop (as in detach and quit, not break).
1 parent 1353a7f commit e6d768c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/features/DebugSession.ts

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import { LanguageClientConsumer } from "../languageClientConsumer";
1818
export const StartDebuggerNotificationType =
1919
new NotificationType<void>("powerShell/startDebugger");
2020

21+
export const StopDebuggerNotificationType =
22+
new NotificationType<void>("powerShell/stopDebugger");
23+
2124
export class DebugSessionFeature extends LanguageClientConsumer
2225
implements DebugConfigurationProvider, vscode.DebugAdapterDescriptorFactory {
2326

@@ -61,6 +64,12 @@ export class DebugSessionFeature extends LanguageClientConsumer
6164
type: "PowerShell",
6265
name: "PowerShell Interactive Session",
6366
}));
67+
68+
languageClient.onNotification(
69+
StopDebuggerNotificationType,
70+
() =>
71+
vscode.debug.stopDebugging(undefined)
72+
);
6473
}
6574

6675
public async provideDebugConfigurations(

0 commit comments

Comments
 (0)