profile
viewpoint
Joshua Flancer fancyplants Full-time student, part-time code monkey. Hoping to help the #Denoland project take off!

issue commentmicrosoft/WSL

(WSL 2) VSCode does not automatically start in Remote WSL mode when opened from Bash command line

Update: someone posted about this in an issue on the Remote Development extension for VSCode, so I think we're all good! (https://github.com/microsoft/vscode-remote-release/issues/714) Keep up the good work on WSL 2 guys

fancyplants

comment created time in 9 days

issue commentmicrosoft/WSL

(WSL 2) VSCode does not automatically start in Remote WSL mode when opened from Bash command line

@mscraigloewen I will file an issue soon with VSCode Remote team as well. As for now, the combos I've tried (at least I think I remember):

  • Reinstalling VSCode
  • Reinstalling Ubuntu WSL 2
  • Uninstalling both, followed by installing Ubuntu WSL 2 and then VSCode

And so far the only fix has been reverting to WSL 1.

fancyplants

comment created time in 12 days

issue commentmicrosoft/WSL

(WSL 2) VSCode does not automatically start in Remote WSL mode when opened from Bash command line

@therealkenc So I installed Ubuntu-18.04 and converted to WSL 2. Unfortunately, same thing happens where it prints those same messages as in the original issue and VSCode does not connect to WSL automatically. As is the same with Ubuntu when using the code . command, this works if you open a new window using the VSCode command Remote-WSL: New Window.

fancyplants

comment created time in 12 days

issue commentmicrosoft/WSL

(WSL 2) VSCode does not automatically start in Remote WSL mode when opened from Bash command line

@mscraigloewen I only have Ubuntu installed, and I've ensured that it's been set to the (Default) distro for WSL.

fancyplants

comment created time in 12 days

issue commentmicrosoft/WSL

(WSL 2) VSCode does not automatically start in Remote WSL mode when opened from Bash command line

I'm (unfortunately?) not able to reproduce this. Windows VS Code 1.35.1 fires up okay from inside WSL2 with the directory given.

I'd hate to suggest doing a --set-version Ubuntu 1 just to see whether it still works (not go back permanently) but I can't think of something else to try. Maybe there is another variable here, but I'm not guessing one atm.

Actually, this seems to fix things. VSCode opens with Remote WSL booting up normally when the version of my Ubuntu install is WSL 1 instead of WSL 2.

fancyplants

comment created time in 12 days

issue openedmicrosoft/WSL

(WSL 2) VSCode does not automatically start in Remote WSL mode when opened from Bash command line

  • Your Windows build number: Microsoft Windows [Version 10.0.18917.1000]

  • What you're doing and what's happening: When evoking code <dir> in WSL 2, VSCode opens and doesn't connect to the Remote WSL server automatically. The program runs within the current terminal context and VSCode closes when the command line version is interrupted.

Powershell:

wsl --set-version Ubuntu 2

WSL bash:

~/code/js$ code .

[main 2019-06-14T05:34:33.398Z] update#setState idle
[main 2019-06-14T05:35:03.409Z] update#setState checking for updates
[main 2019-06-14T05:35:03.451Z] update#setState idle


  • What's wrong / what should be happening instead: The behavior of WSL 1 (which works with this normally):

WSL Bash:

~/code/js$ code .
~/code/js$

code <dir> command is evoked, pauses for a moment, and then returns to command line, while VSCode opens and automatically boots up the Remote WSL server within that folder.

(The rest of the parts were not applicable) If more information is needed, just ask! Thank you WSL team for the work you do. This is my only issue with WSL 2 so far!

created time in 13 days

startedEnterpriseQualityCoding/FizzBuzzEnterpriseEdition

started time in 2 months

startednilshah98/worker-threads-NodeJS

started time in 3 months

create barnchfancyplants/timestamp-poc

branch : master

created branch time in 3 months

created repositoryfancyplants/timestamp-poc

created time in 3 months

more