microsoft / microsoft/vscode

"Debug adapter process has terminated unexpectedly" after long-running debug sessions, while the adapter process is still alive

Open
#333,505 2 comments 0 reactions 1 assignee Claimed by @connor4312 View on GitHub
bug debug
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: 1.118.0
- OS Version: Windows_NT x64 10.0.26200

Steps to Reproduce:

1. Start an extension that writes a lot of output (in my case I wrote a private debug adapter that I cannot share here)
2. Wait. No specific user action triggers the failure.

Expected behavior
Output logs will get removed automatically when they are too many, so I can let my process run forever.

Actual behavior
1. VS Code shows the error notification: "Debug adapter process has terminated unexpectedly."
2. The debug session is torn down in the UI.
3. However, the debug adapter executable is still running as an OS process — VS Code apparently considered it terminated while it was not.
4. The extension host still reports the debug extension as running/activated.
5. Repeated occurrences leave multiple orphaned adapter sessions behind, because each failed session leaks its adapter process.
6. The failure is sporadic and correlates with session duration, not with a particular DAP request.

Frequency
Sporadic; reproduced reliably by leaving a debug session running for ~1 hour.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.