Visual studio code 无法使用cmd代码在ubuntu上的WSL bash中打开vscode

Visual studio code 无法使用cmd代码在ubuntu上的WSL bash中打开vscode,visual-studio-code,windows-subsystem-for-linux,Visual Studio Code,Windows Subsystem For Linux,当我试图在Ubuntu 20.04上的WSL bash中使用命令code.打开vscode时,它失败了,并记录了以下消息: /mnt/c/Users/john/.vscode/extensions/ms-vscode-remote.remote-wsl-0.50.1/scripts/wslCode.sh: 57: /home/john/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/bin/code: not found

当我试图在Ubuntu 20.04上的WSL bash中使用命令
code.
打开vscode时,它失败了,并记录了以下消息:

/mnt/c/Users/john/.vscode/extensions/ms-vscode-remote.remote-wsl-0.50.1/scripts/wslCode.sh: 57: /home/john/.vscode-server/bin/d2e414d9e4239a252d1ab117bd7067f125afd80a/bin/code: not found

我想问一下如何解决这个问题?太多了

我找到了解决办法。尽管我认为你已经知道了

您需要使用
sudo rm-rf/home/john/.vscode服务器
删除文件夹
/home/john/.vscode服务器

然后,您只需运行
code.
或尝试打开所需的任何项目

然后,脚本将加载并在您的计算机中安装一个新的
.vscode服务器
,其中包含正确的文件