Here's how I do a nuclear reinstall of VSCode (ie uninstall, reset caches, remove all exteions, etc). It is useful when I am completely at my wit's end. I've only had to do it twice, but wanted to capture it for next time. It is based on microsoft/vscode-python#24839 (comment). It might change in a future version of VSCode; worked for me as of VSCode 1.104.1 to solve microsoft/vscode-python#24839
- Backup extensions list and config files I care about
mkdir ~/vscode-backup code --list-extensions > ~/vscode-backup/installed-extensions.txt cp "$HOME/Library/Application Support/Code/User/settings.json" ~/vscode-backup cp "$HOME/Library/Application Support/Code/User/tasks.json" ~/vscode-backup cp "$HOME/Library/Application Support/Code/User/keybindings.json" ~/vscode-backup
- Move VSCode to bin
- Empty trash
- 🧨
rm -rf ~/.vscode rm -rf ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState sudo rm /usr/local/bin/code rm ~/Library/Preferences/com.microsoft.VSCode.plist rm -rf ~/Library/Caches/com.microsoft.VSCode.ShipIt rm -rf ~/Library/Logs/Code rm -rf ~/Library/Caches/com.microsoft.VSCode rm -rf ~/Library/Application\ Support/Code
- Restart computer for good measure
- Reinstall VSCode
- Open VSCode
- Open your python project
- Install python extension
- Confirm things are now working
- Reinstall code CLI
- Move those config backups back
cp ~/vscode-backup/settings.json "$HOME/Library/Application Support/Code/User" cp ~/vscode-backup/tasks.json "$HOME/Library/Application Support/Code/User" cp ~/vscode-backup/keybindings.json "$HOME/Library/Application Support/Code/User"
- Check that things are still working
- Reinstall extensions manually as you notice they're missing, doing a window reload after each one to confirm things haven't broken again. You could look in
~/vscode-backup/installed-extensions.txtto see what you had before or even use a script like in microsoft/vscode-python#24839 (comment) to automatically reinstall all of them, but it felt good to have a clean slate and only install the stuff I notice is missing 😄