Vscode-remote-release: code doesn't open in remote-wsl under WSL2

Created on 16 Jun 2019  路  6Comments  路  Source: microsoft/vscode-remote-release


  • VSCode Version: 1.35.1
  • OS Version: 10.0.18917

Steps to Reproduce:

  1. Create a WSL-2 distro
  2. under a working directory, do code .


Does this issue occur when all extensions are disabled?: Yes

It looks like the code script for bash under Microsoft VS Code\bin\ needs to be updated for compatibility with WSL2, because at line 14, WSL2 doesn't give build number with $(uname -r | sed -E 's/^.+-([0-9]+)-[Mm]icrosoft/\1/'):

uname -r in WSL2 gives: 4.19.43-microsoft-standard
uname -r in WSL1 gives: 4.4.0-18917-Microsoft

bug verified wsl

Most helpful comment

fixed in latest (still need to make a new remote-wsl release)

All 6 comments

With your default distro set to WSL2, VS Code will open in there and work but sadly not using the code . shortcut, you have to use "Remote-WSL: New Window" from the command pallet. Once you do this, VS Code will open a new instance running remotely inside WSL2

@benc-uk , I know, but still... When I'm in keyboard mode, I just don't feel like to switch to touchpad, let alone I have to click along paths to my desired directory.

You can do it all via keyboard, but yes I hear you. It needs fixing

I've tried tweaking the bash script Microsoft VS Code/bin/code to bypass the checks but it's still failing to open for some reason I can't work out

There are two problems. One with the code script in VSCode, which I fixed.
The second one is in the extension, which will be fixed with the next release

fixed in latest (still need to make a new remote-wsl release)

@aeschli thank you for fixing this bug. Still facing this issue. When is the next release due?

Was this page helpful?
0 / 5 - 0 ratings