打开setting Remote-ssh 时 显示:no remote extension installed to resolve ssh-remote
并且远程时总是显示
Failed to connect to the remote extension host server (Error: CodeError(AsyncPipeFailed(Os { code: 2, kind: NotFound, message: "No such file or directory" })))
使用其他工具ssh 直接登上服务器,发现服务器 ~/ 有两个文件夹
.vscode-server/
.vscode-remote-containers/
我尝试将 rm -r .vscode-remote-containers/ 删除后,则解决了远程文件打开不了的问题。
如果仅仅删除.vscode-remote-containers/不行,或者本来就没有这个文件夹,则可以i直接删除 rm -r .vscode-server/.
另:其他可以尝试的包括按照旧版本的vscode https://code.visualstudio.com/updates/v1_86
然后remote-ssh 工具也install other version.
update:
这个问题也有可能是本地的vscode 的配置出问题了。将本地的缓存都删了,然后重新装
VSCode在Windows 11上的本地文件主要存储在以下位置:
- 用户设置和扩展:
具体路径通常是:
C:\Users\[用户名]\AppData\Roaming\Code
- 缓存文件:
具体路径通常是:
C:\Users\[用户名]\AppData\Local\Code
要完全重置VSCode,你需要:
先卸载VSCode
删除这两个文件夹
重新安装VSCode
如果只想重置设置而保留程序本身:
关闭VSCode
删除上述文件夹
重新打开VSCode,它会自动创建新的默认设置