admin管理员组

文章数量:1292167

On Windows 11: I get the error when using CTRL SHIFT P, if I just click on the command it simply does nothing. Cannot find

From wsl.exe I am able to open VS code by typing "code", but I always get "Disconnected to WSL" on the bottom left corner in green Bottom left

I also get "File system provider for vscode-remote://wsl%2Bubuntu/home is not available." from the instances that are trying to connect to WSL

and

File system provider for vscode-remote://wsl%2Bubuntu/home/WSLUSERNAME is not available.

I also can't open files from the WSL VS code I open, it just opens it again in the windows version

WHAT I'VE TRIED

According to another thread my environment paths should be fine because I can open VS code from within wsl.exe and windows command line, but I don't know how to make sure

Tried this from another thread, I have the newest versions of everything, too

rm -rf ~/.vscode-server
rm -rf ~/.vscode
code .

Still get this

So it's not just a command line

I have tried the wsl --shutdown from powershell and command line

WSL vscode command returning error "not found"

I tried the using Distro thing suggested here (but I got nothing so idk if I even input it correctly)

EDIT: I uninstalled and reinstalled VS code, everything works the same from Windows side but from the WSL side "code" was no longer working. I navigated to the folder I wanted from within the command line

cd /mnt/c/Users/USERNAME/etc

and typed "code" there and I just said yes to everything

with sudo snap install code

enter image determinal

So I installed a version of VS code within it, this kinda works I think? So I'm gonna try to set it up

EDIT 2 : I didn't uninstall VS code inside WSL but now I can open the WSL one that just runs from within WSL itself, like a GUI with code but it's still not working so I might just reinstall it again, I'm not sure what I did that made it change back, but I didn't uninstall it and now it won't let me access it again because it says it's already installed. I would like to do so and do that instead

本文标签: visual studioError connecting to WSL 2 from VS code ( remotewslconnect not found )Stack Overflow