Visual Studio Code not running/working on WSL 2

Viewed 6348

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.

1 Answers

Well, after some research, what really fixed the issue for me was the following:

  1. Within the WSL terminal, type 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 log in back to your WSL and run code . and it should work normally.

Related