What is it?
This VS-Code error could appear when user is running the debug mode of the editor (any debug configuration).
What happens is, when the
Start Debugging button is pressed, the debugging process abruptly stops and a toast message
Debug adapter process has terminated unexpectedly displays. Opening the developer console of VSCode also does not give much context since the error is only traceable until the Notification management code of VSCode.
As the name implies, the debug adapter process is the cause. Specifically, VS Code cannot find the part related to the debug adapter so it cannot start the process.
This is noticeable since the message displays twice, albeit in very quick succession. This means that VS Code tries to recover from the initial failure to launch the Debug adapter process.
In my case, possible cause was during VS Code update (installation may have been corrupted). But what the actual cause (why the debug adapter actually broke), is still currently unknown.
The currently known fix for this is (from a vague S.O. question-answer thread and some GitHub issues) is either to:
- re-install extensions
- re-install VS-Code
In my context, running Go code,
- reinstalling at least the delve executable (debug tool for Go).
Ultimately, what solved the process for me was re-installation of VS Code.
- Go debug adapter process has terminated unexpectedly in VS Code – Stack Overflow
- Debug adapter process has terminated unexpectedly · Issue #63107 · microsoft/vscode · GitHub
- The mystery of “Debug adapter process has terminated unexpectedly” – Dots and Brackets: Code Blog