Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code not running/working on WSL 2

Somehow when I run code . inside the WSL, it simply doesn't do anything. If I which code it does return the VS Code path on windows, but still nothing happens.

like image 376
rrmesquita Avatar asked Apr 13 '26 07:04

rrmesquita


1 Answers

After some research, what really fixed the issue for me was this:

  1. Within the WSL terminal, run rm -r ~/.vscode-server to delete the VS Code WSL server.
  2. Exit the terminal and from your PowerShell/Cmd, run wsl --shutdown.

Then you can go back to WSL and run code . and it should work normally.

like image 129
rrmesquita Avatar answered Apr 16 '26 15:04

rrmesquita