问题

由于意外错误,无法打开编辑器:Unable to resolve resource vscode-remote://wsl%2BUntutu-22.04

原因:因为VSCode与WSL未连接:

command 'remote-wsl.connectUsingDistro' not found: Error: command 'remote-wsl.connectUsingDistro' not found

解决方法:

1.在WSl中安装openssh-server

sudo apt-get install openssh-server

2.在vscode中安装remote development插件

3.若使用到docker,则需要下载docker相关插件

4.关掉重启vscode(可能需要重启几次,更改才能生效)

好文推荐

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: