Content Insights Tip #72 | Remote Extension host terminated unexpectedly 3 times within the last 5 minutes.
Recently, I encountered an error in VS Code that disrupted my workflow. A quick check with ChatGPT suggested the issue might be caused by a faulty extension. Following the advice, I disabled all my extensions. Initially, this seemed to work for the first five to ten minutes, but the error reappeared shortly after.
Example image, copied from Github (author Andrei Stoica)
Frustrated by the slowdown, I contemplated doing a clean install of VS Code. It's something I’ve done a few times over the past two years since getting this laptop. However, I was hesitant—clean installs are always more time-consuming than expected. There’s always that one app you forget to reinstall or that one setting you need to reconfigure.
Before resorting to this "path of hell," I decided to give Google a try. After some digging, I found a few commands that could completely remove VS Code from my WSL (Windows Subsystem for Linux) instance. Running these commands helped me resolve the issue without needing to go nuclear with a full reinstall.
Here are the commands I used to remove VS Code from my WSL instance:
rm -fr ~/.vscode-remote-containers
rm -fr ~/.vscode-server
rm -fr ~/.vscode
.cd your_project_folder
code .
I hope this helps you save time and effort in resolving the issue!