From 422c63bca0883515a545642a49b63e61f218e30b Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Fri, 31 Jul 2026 11:43:33 -0400 Subject: [PATCH] fix(vscode): terminate both debug sessions together when debugging the extension Closing the Extension Development Host window ended the client session without a manual stop, which the compound's stopAll does not cover, leaving the attached language server running. Add cascadeTerminateToConfigurations so the attach session is torn down with it, and stopAll on the compound so stopping either session ends both instead of leaving an orphan in the Call Stack view. --- .vscode/launch.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 49952259cee..d3c4b7e94e9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -122,6 +122,9 @@ "request": "launch", "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode"], "outFiles": ["${workspaceFolder}/packages/typespec-vscode/dist/**/*.cjs"], + // Closing the Extension Development Host window ends this session without a manual stop, + // which compound `stopAll` does not cover, so cascade the termination explicitly. + "cascadeTerminateToConfigurations": ["Attach to Language Server"], "env": { // Log elapsed time for each call to server. //"TYPESPEC_SERVER_LOG_TIMING": "true", @@ -187,6 +190,9 @@ { "name": "VS Code Extension", "configurations": ["VS Code Extension (Client)", "Attach to Language Server"], + // Stopping either the extension host or the language server session terminates both, + // instead of leaving an orphan session behind in the Call Stack view. + "stopAll": true, "presentation": { "order": 1 }