Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WSL 2 VS code Segmentation fault [duplicate]

Problem

The problem is that when running VS code for wsl2, the following error occurs Segmentation fault

$ code .
Segmentation fault
like image 419
Илья Хоришко Avatar asked Sep 10 '26 18:09

Илья Хоришко


1 Answers

Suggestion

UPD 06.09.2024

  1. Do this in the WSL console
 rm -rf ~/.vscode-server
  1. Do this in the WSL console
code .

Old

  1. Do this in the WSL console
sudo apt-get remove code
  1. Remove VS code from windows Docs
  2. Reload PC
  3. Install VS Code on windows (don't forget to check "Add PATH") Docs
  4. Reload PC
  5. Do this in the WSL console
 rm -rf ~/.vscode-server
  1. Do this in the WSL console
code .

After completing these steps, you should have vs code running without any problems. If you consider it necessary to skip the steps with restarting the PC, this is your right. I just wrote a sequence of actions that helped me solve the problem

Thanks for the decision to this guy: Link

like image 180
Илья Хоришко Avatar answered Sep 13 '26 16:09

Илья Хоришко