Skip to content

Improve VS Code extension LSP lifecycle error handling#10756

Open
RodgeFu wants to merge 1 commit into
microsoft:mainfrom
RodgeFu:tel-improve2
Open

Improve VS Code extension LSP lifecycle error handling#10756
RodgeFu wants to merge 1 commit into
microsoft:mainfrom
RodgeFu:tel-improve2

Conversation

@RodgeFu
Copy link
Copy Markdown
Contributor

@RodgeFu RodgeFu commented May 21, 2026

Improve VS Code extension error handling based on telemetry from current compiler usage.

Summary:

  • Add targeted handling for known LSP lifecycle race errors during start/stop/dispose transitions so expected shutdown/restart conditions no longer surface as noisy unhandled failures.
  • Treat VS Code window-close prompt cancellation as a normal cancellation path instead of an unexpected startup error.
  • Dispose the previous LSP client during recreation so resources and registered commands are cleaned up before the next client starts.
  • Keep unknown failures visible so telemetry can still surface real bugs instead of broadly suppressing errors.
  • Scope the strategy to the latest compiler behavior (1.12 telemetry), with no special handling for older compiler versions, to keep the changes focused and minimal.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 21, 2026

Open in StackBlitz

npm i https://pkg.pr.new/typespec-vscode@10756

commit: 3768b50

@github-actions
Copy link
Copy Markdown
Contributor

❌ There is undocummented changes. Run chronus add to add a changeset or click here.

The following packages have changes but are not documented.

  • typespec-vscode
Show changes

@azure-sdk-automation
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

ide Issues for VS, VSCode, Monaco, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant