# VS Code Language Server Error
VS Code's IntelliSense has stopped working entirely. The status bar shows "Loading..." indefinitely, or you see "Language server crashed" messages in the Output panel. Code completion doesn't appear, errors aren't highlighted, and go-to-definition stopped working. Language servers power all intelligent code features in VS Code, and when they fail, you're back to basic text editing.
Understanding Language Servers
Language servers are separate processes that provide:
- Code completion and IntelliSense
- Error diagnostics and squiggles
- Go-to-definition and references
- Symbol search and rename
- Code actions and quick fixes
Each language (TypeScript, Python, Go, Rust, etc.) has its own language server. When one crashes, features for that language disappear.
Step 1: Identify Which Language Server Failed
Different language servers fail independently:
- 1.Check Output panel:
- 2.Output → Select language-specific dropdown
- 3.- "TypeScript" for JS/TS
- 4.- "Python" for Python
- 5.- "Go" for Go
- 6.- "Rust Analyzer" for Rust
Look for crash messages:
``
[error] The TypeScript server died unexpectedly
[error] Connection to server got closed
[error] Language server process exited with code 1
Check status bar: Hover over the language indicator (bottom right) to see server status.
Step 2: Restart the Language Server
Most language servers have restart commands:
TypeScript/JavaScript:
Ctrl+Shift+P → "TypeScript: Restart TS Server"
Python:
Ctrl+Shift+P → "Python: Restart Language Server"
Go:
Ctrl+Shift+P → "Go: Restart Language Server"
General (reload window):
Ctrl+Shift+P → "Developer: Reload Window"
This clears temporary state and restarts the server process.
Step 3: Check Extension Activation
Language servers come from extensions:
Verify extension is installed:
``bash
code --list-extensions | grep -i "language-name"
Check extension is enabled: Extensions panel → Search for language extension → Ensure not disabled
Force extension activation:
``bash
code --uninstall-extension publisher.extension-name
# Restart VS Code
code --install-extension publisher.extension-name
Step 4: Enable Server Logging
See exactly what's failing:
Enable verbose logs:
For TypeScript:
``json
{
"typescript.tsserver.log": "verbose",
"typescript.tsserver.trace": "verbose"
}
For Python:
``json
{
"python.analysis.logLevel": "trace"
}
For other languages, check extension settings for log/trace options.
View logs: Output panel → Select appropriate dropdown → Read crash details
Step 5: Fix Memory Issues
Language servers crash from memory exhaustion in large projects:
Increase memory limits:
TypeScript:
``json
{
"typescript.tsserver.maxTsServerMemory": 8192
}
Python (Pylance):
``json
{
"python.analysis.memory": 8192
}
Monitor memory: ```bash # Find language server process ps aux | grep -i "typescript|pylance|rust-analyzer"
# Check memory usage top -p <pid> ```
Step 6: Handle Project Configuration Issues
Language servers need proper project configuration:
TypeScript needs tsconfig.json:
``json
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs"
},
"include": ["src/**/*"]
}
Python needs interpreter:
Ctrl+Shift+P → "Python: Select Interpreter"
Go needs go.mod:
``bash
go mod init your-module
Rust needs Cargo.toml:
``bash
cargo init
Missing configuration causes servers to fail or misbehave.
Step 7: Check for Conflicting Extensions
Multiple language extensions conflict:
List all language extensions:
``bash
code --list-extensions
Common conflicts: - Multiple Python extensions (ms-python.python vs others) - TypeScript + JavaScript Nightly (should work together) - Multiple linters for same language
Test without other extensions:
``bash
code --disable-extensions --install-extension publisher.language-extension
Step 8: Fix Platform-Specific Issues
Windows:
Long path issues:
``json
{
"typescript.tsserver.enableWindowTitle": false
}
Linux:
File watcher limits:
``bash
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
macOS:
Keychain integration for some language servers:
``bash
# If authentication issues
security unlock-keychain
Step 9: Clear Caches
Language server caches can corrupt:
TypeScript:
``bash
rm -rf .tsbuildinfo
rm -rf tsconfig.tsbuildinfo
rm -rf node_modules/.cache
Python:
``bash
rm -rf ~/.cache/pylance
General VS Code:
Ctrl+Shift+P → "Developer: Clear Cache"
Verification
Test language server works:
- 1.Open file for that language
- 2.Type code - IntelliSense should appear
- 3.Make an error - squiggles should show
- 4.Right-click symbol → Go to Definition should work
- 5.Problems panel should show diagnostics
- 6.Status bar should not show "Loading..."
Quick Reference
| Language | Restart Command | Common Fix |
|---|---|---|
| TypeScript | "TypeScript: Restart TS Server" | Increase memory, fix tsconfig |
| Python | "Python: Restart Language Server" | Select interpreter |
| Go | "Go: Restart Language Server" | Run go mod init |
| Rust | Reload window | Check Cargo.toml |
| Java | Reload window | Clean Java workspace |
| C/C++ | Reload window | Check compile_commands.json |
Language server failures usually stem from memory limits, missing configuration, or corrupted caches. Start with restart, then check configuration and memory.