Open mikeshepherd opened 1 year ago
This is also an issue I have run into. I am forced to downgrade the extension for now unfortunately.
Thank you for the hint @purepani! At least I have an editor again (for now) For anyone else stumbling upon this, the command is
code --install-extension ms-vscode-remote.remote-wsl@0.76.0
The required environment variables can be found from a login shell
wsl -e sh -l -c env # NIX_LD is available
wsl -e env # NIX_LD is not available
Workaround:
Search for the following text in all files under the directory $HOME\.vscode\extensions\
.push("sh","-c"
Replace it with
.push("sh","-l","-c"
Restart VS Code
@aeschli I wonder if you would like to apply the change as I described in the above comment?
I am just trying to be annoying to get some attention to this issue.
Definitely would appreciate if more attention was given to this. I understand that this is a NixOS specific challenge and that the mainstream WSL distros work, but would love to see some additional support from the extension team.
Same, I have to switch between Linux and windows a lot so it would be good if I could properly use this extension.
I'm also having problems with NixOS-WSL. Would love to find a good solution
Has there been any progress with this issue?
I cannot use WSL with VSCode since upgrading to vscode version 1.77, wsl extension 0.77.0. I believe the problem is due to the removal of
remote.WSL2.connectionMethod
option.I use NixOS as my linux host and need to set some specific environment variables for the node binaries vscode installs to work. Specifically the node binary has hardcoded paths to the libraries (glibc and others) it uses, which are in a non standard place on NixOS. This can be worked around by setting some environment variables for the link loader to point it to the correct locations.
I have previously done (and still do) this via the
server-env-setup
script that is run during remote start. However this script is not run when starting the proxywslExeProxy
, which uses node on the linux host, which then fails to start, and so the remote connection fails.The
server-env-setup
script looks like thishowever those paths are liable to change so it would not be possible/sustainable to set them outside of the linux host.
VSCode Version: 1.77.0
Local OS Version: Windows_NT x64 10.0.19044
Remote OS Version: NixOS 22.11
Remote Extension/Connection Type: WSL (v2)
Logs: I think these are the relevant parts of the log, I can supply a full log if required.
Steps to Reproduce:
It is possible to replicate this behaviour outside of vscode: