VS Code's "Extension Host Terminated" error means an extension crashed the editor's extension process, and the editor automatically attempted to reload. This happens when an extension has an unhandled exception, runs out of memory, or fails in native code.
Finding which extension caused it requires accessing diagnostic logs and isolating suspects—VS Code provides built-in tools to pinpoint the culprit without manually testing each one. The fix can be as simple as disabling or updating the offending extension, but first you need to know which one it is. Most developers don't see this error unless they have many extensions installed, run memory-heavy tasks, or hit a recently-introduced bug in a third-party extension.
Table of Contents
- Where to find the crash details
- Disable all extensions to confirm the problem
- Use extension-bisect to narrow it down
- Memory exhaustion is the leading cause
- What to do after you identify the extension
- Frequently Asked Questions
Where to find the crash details
Open the Command Palette with Ctrl+Shift+P (or Cmd+Shift+P on Mac) and run "Developer: Show Logs." From the Output panel dropdown, select the "Extension Host" channel to view recorded crash logs, including stack traces and error codes. Some exceptions print only to the Developer Tools console (Help > Toggle Developer Tools), so if the Extension Host log doesn't name the responsible extension, check the console for additional context. The stack trace often points directly to the extension file and function that crashed.
Disable all extensions to confirm the problem
The fastest way to know if an extension is at fault is to start VS Code with extensions disabled via `code –disable-extensions` from the command line. If the Extension Host crash stops happening, an extension is definitely the cause.
If the crash persists, the problem lies in VS Code itself or a core system library, which is rare and warrants a bug report to VS Code on GitHub. This test takes two minutes and rules out 90% of causes immediately.
Use extension-bisect to narrow it down
VS Code includes a methodical bisect feature that cuts your extension list in half, tests for the crash, and repeats with the survivors until it isolates the culprit. The extension-bisect feature narrows down the problem by disabling half of your extensions, reloading the window (Developer: Reload Window), and testing whether the crash recurs.
Follow the prompts: they guide you through narrowing the list until a single extension emerges as the cause. This is more reliable than manually toggling extensions one at a time.
Memory exhaustion is the leading cause
Memory exhaustion in the V8 JavaScript heap is the leading cause of recent Extension Host termination reports, with individual extensions consuming 2+ GB or gradual leaks over hours causing out-of-memory crashes. Watch for error codes like "code: 5" or "code: -536870904" in your logs—these signal an out-of-memory kill.
Event listener leaks (listeners added but never removed) can cause unbounded memory growth over time and trigger "MaxListenersExceeded" warnings in the Extension Host output before an OOM crash. Run VS Code with `code –verbose` to expose warnings before the crash, and use `code –status` to watch real-time memory and process information for the main window and its extension host while you're working. If memory stays below 1 GB during normal use, memory exhaustion is not the culprit.
What to do after you identify the extension
Once you've found the responsible extension, check its repository or the VS Code Marketplace for open issues or recent updates that may fix the bug. If the latest version still crashes, disable it and report the problem to the extension's maintainer with the crash log from the Extension Host channel. If the extension is no longer maintained, consider switching to an alternative that provides the same functionality.
Frequently Asked Questions
Does "Extension Host Terminated" mean I need to reinstall VS Code?
No. The error is an extension crash, not a VS Code installation problem. Disabling or updating the extension resolves it; reinstalling VS Code is unnecessary and wastes time.
Can I find which extension crashed without using extension-bisect?
Yes. Check the Extension Host log (Developer: Show Logs > Extension Host channel) for a stack trace that names the extension. If the log doesn't name it clearly, extension-bisect is the most reliable method, but it requires reloading the editor several times.
Why does the error say "Extension Host Terminated" and not just "Extension Crashed"?
The extension host is a separate VS Code subprocess that runs all extensions together. When one extension crashes or runs out of memory, it terminates the entire host process, affecting all extensions until VS Code reloads them.