Skip to content

fix(vscode): terminate both debug sessions together when debugging the extension - #11511

Open
timotheeguerin wants to merge 2 commits into
microsoft:mainfrom
timotheeguerin:fix/vscode-launch-cascade-terminate
Open

fix(vscode): terminate both debug sessions together when debugging the extension#11511
timotheeguerin wants to merge 2 commits into
microsoft:mainfrom
timotheeguerin:fix/vscode-launch-cascade-terminate

Conversation

@timotheeguerin

Copy link
Copy Markdown
Member

Debugging the VS Code extension leaves orphaned debug sessions behind.

The VS Code Extension compound launches two sessions: the extension host client and an attach to the language server. Ending the debug session the usual way — closing the Extension Development Host window — terminates the client without going through a manual stop, so the language server session keeps running and lingers in the Call Stack view. You then have to stop it by hand before the next F5, and stale servers accumulate across iterations.

Two small config additions fix it:

  • cascadeTerminateToConfigurations on VS Code Extension (Client) tears down the attach session when the extension host window closes. The compound's stopAll alone does not cover this case, because closing the window is not a stop request.
  • stopAll: true on the VS Code Extension compound makes stopping either session terminate both, so neither can be orphaned.

Now F5 → close the dev host window returns you to a clean Call Stack every time.

…e 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.
@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@timotheeguerin
timotheeguerin marked this pull request as ready for review July 31, 2026 15:50
@azure-sdk-automation

azure-sdk-automation Bot commented Jul 31, 2026

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant