The Error
You're deep in a coding session when VS Code locks up and a dialog pops:
Extension host is unresponsive. Do you want to restart it?
Clicking "Restart" buys you a few minutes โ then it freezes again. Sometimes the dialog never shows at all. VS Code just hangs, IntelliSense stops responding, and the status bar shows a spinner that never clears.
The extension host is a separate Node.js process that runs all your installed extensions. When it deadlocks, VS Code's core editor keeps working โ but everything extension-powered stops. IntelliSense, linting, Git decorations, snippets: all gone.
Step 1: Identify the Offending Extension
Don't start disabling extensions blindly. First, pinpoint what's hanging. Open the built-in process explorer:
Help โ Open Process Explorer
Look for any extension process with sustained CPU above 30โ50%, or memory climbing past 500MB. The process name includes the extension ID.
If the process explorer itself won't open, switch to your OS task manager. On Windows, filter for Code.exe or node.exe processes โ the highest-CPU one is typically the extension host. On macOS/Linux, run top and look for node.
The fastest sanity check:
code --disable-extensions
If VS Code runs cleanly, an extension is definitely at fault.
Step 2: Bisect to Find the Exact Extension
Binary search beats manual trial-and-error. VS Code has this built in:
Ctrl+Shift+P โ Extensions: Start Extension Bisect
VS Code disables half your extensions and asks: "Does the problem still occur?" Keep answering. It narrows to one extension in 4โ6 steps โ regardless of how many you have installed.
Prefer manual control? Disable half, restart, check. Re-enable the disabled batch and disable the other half. Repeat until isolated.
Step 3: Fix or Replace the Problem Extension
You've found it. Try these in order:
- Update it โ open Extensions (
Ctrl+Shift+X), find the extension, click Update. A surprising number of extension host hangs are already fixed in the latest release. - Reinstall it โ clears corrupted state that a plain update might leave behind:
# Via command line
code --uninstall-extension publisher.extension-name
code --install-extension publisher.extension-name
- Disable for this workspace only โ right-click โ Disable (Workspace). The extension stays available in other projects while you investigate.
- File a bug โ search the extension's GitHub Issues. Odds are someone else hit this already and there's a workaround buried in the comments.
Step 4: Extensions That Cause This Most Often
Some categories consistently top the offender list:
- Language servers (Pylance, ESLint, Java Language Support) โ deadlock on large projects. Pylance can spike to 100% CPU on Python repos with 2,000+ files and no
excludepath configured. - GitLens โ struggles on repos with 10,000+ commits or large binary histories.
- Remote Development extensions (SSH, WSL, Dev Containers) โ a slow or dropped connection causes the extension host to time out waiting for a response.
- Prettier + ESLint together โ can create a formatting loop on save where each triggers the other endlessly.
- GitHub Copilot / IntelliCode โ model inference is CPU-heavy. On machines with less than 8GB RAM, it can stall the entire extension host.
Step 5: Tune Extension Host Settings
Intermittent freezes not tied to one extension usually respond to configuration changes. Open settings.json (Ctrl+Shift+P โ Open User Settings (JSON)) and add:
// Isolate a specific extension in its own dedicated host process
// โ prevents one bad extension from taking down all the others
"extensions.experimental.affinity": {
"publisher.extension-name": 1
},
// Fewer suggestion triggers = less load on the extension host
"editor.quickSuggestions": {
"other": "off",
"comments": "off",
"strings": "off"
},
// Disable Microsoft A/B experiments and telemetry
"workbench.enableExperiments": false,
"telemetry.telemetryLevel": "off"
For language servers specifically, limit what they scan:
// ESLint โ only probe file types you actually use
"eslint.probe": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
// Pylance โ exclude folders with thousands of files
"python.analysis.exclude": ["**/node_modules", "**/.venv", "**/dist", "**/__pycache__"]
Step 6: Clear the Extension Cache
Corrupted extension storage causes hangs that survive reinstalls. Wipe the cache entirely:
# Linux / macOS
rm -rf ~/.vscode/extensions/.obsolete
rm -rf ~/.config/Code/Cache
rm -rf ~/.config/Code/CachedData
# Windows (PowerShell)
Remove-Item -Recurse -Force "$env:USERPROFILE\.vscode\extensions\.obsolete"
Remove-Item -Recurse -Force "$env:APPDATA\Code\Cache"
Remove-Item -Recurse -Force "$env:APPDATA\Code\CachedData"
Restart VS Code after. It rebuilds the cache on first launch โ expect 30โ60 seconds before extensions fully activate.
Step 7: Check for System-Level Issues
The extension host is a Node.js process. System constraints hit it directly:
- Low RAM: With less than 4GB free, the OS starts swapping to disk. The extension host appears frozen while it waits on memory. Close other apps, or this will keep recurring.
- Antivirus real-time scanning: AV tools that scan
.vscodeor your workspace on every file write can block the I/O extensions depend on. Add your workspace path to the AV exclusion list. - Network drives: SMB and NFS mounts don't support file watchers reliably. Extensions watching for file changes time out. Keep project files local and sync separately.
- WSL on Windows: Cross-filesystem access (Windows โ WSL) is slow. If your files live at
/mnt/c/Users/..., move them to~/projects/inside WSL โ extension host response times often drop from several seconds to milliseconds.
Verify the Fix
Open the project that was triggering the freeze. Then run through this checklist:
- Wait 2โ3 minutes with a file open โ that's usually when the hang would kick in
- Check
Help โ Open Process Explorerโ extension host CPU should idle below 10% - Trigger IntelliSense (
Ctrl+Space) โ first response should arrive within 1โ2 seconds - Save a file โ no spinner, no persistent "Loading..." in the status bar
- Check Git decorations โ they should update within 3โ5 seconds of a file change
No dialog. IntelliSense responds. The fix held.
Quick Reference
- Test without extensions:
code --disable-extensions - Auto-bisect:
Ctrl+Shift+P โ Extensions: Start Extension Bisect - Reload extension host without restarting VS Code:
Ctrl+Shift+P โ Developer: Restart Extension Host - View extension logs:
Ctrl+Shift+P โ Developer: Show Logs โ Extension Host - Profile slow extensions:
Ctrl+Shift+P โ Developer: Show Running Extensions(shows activation time per extension)

