Vscode: Launching VS Code via Windows Subsystem Linux should return to prompt and suppress output

Created on 27 Feb 2018  路  12Comments  路  Source: microsoft/vscode

Edit:
Posted by: nikhilweee

I figured out that this is actually the output of the main Log of VSCode. The question could now be phrased in a better manner - something like "VSCode leaks main log output to WSL Terminal".

Issue Type

Bug

Description

Launch editor thru WSL on windows 10 64-bit by using command 'code .'

I get this message in the terminal:
[main 12:16:59] update#setState idle
[main 12:17:29] update#setState checking for updates
[main 12:17:30] update#setState idle

And I need to press ctrl + c to get rid of it if I want to use the terminal during coding.

VS Code Info

VS Code version: Code 1.20.1 (f88bbf9137d24d36d968ea6b2911786bfe103002, 2018-02-13T15:34:36.336Z)
OS version: Windows_NT x64 10.0.16299


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (8 x 3400)|
|Memory (System)|7.94GB (2.42GB free)|
|Process Argv|C:\Program Files\Microsoft VS Code\Code.exe|
|Screen Reader|no|
|VM|40%|

Extensions (6)

Extension|Author (truncated)|Version
---|---|---
path-intellisense|chr|1.4.2
bracket-pair-colorizer|Coe|1.0.10
vscode-eslint|dba|1.4.7
vscode-icons|rob|7.20.0
vscode-js-console-utils|wht|0.7.0
ReactSnippets|xab|1.7.0

(1 theme extensions excluded)


Reproduces without extensions

WSL bug help wanted verified windows workbench-cli

Most helpful comment

And I need to press ctrl + c to get rid of it if I want to use the terminal during coding.

Even this doesn't solve the problem for me. Apparently VSCode checks for updates every hour. Here's the output from an idle terminal with VSCode open. I think this needs to be solved soon.

[main 4:21:06 PM] update#setState idle
[main 5:21:05 PM] update#setState checking for updates
[main 5:21:06 PM] update#setState idle
[main 6:21:05 PM] update#setState checking for updates
[main 6:21:06 PM] update#setState idle
[main 7:21:05 PM] update#setState checking for updates
[main 7:21:06 PM] update#setState idle
[main 8:21:05 PM] update#setState checking for updates
[main 8:21:06 PM] update#setState idle
[main 9:21:05 PM] update#setState checking for updates
[main 9:21:06 PM] update#setState idle
[main 10:21:05 PM] update#setState checking for updates
[main 10:21:06 PM] update#setState idle
[main 11:21:05 PM] update#setState checking for updates
[main 11:21:06 PM] update#setState idle
[main 12:21:05 AM] update#setState checking for updates
[main 12:21:06 AM] update#setState idle
[main 1:21:05 AM] update#setState checking for updates
[main 1:21:06 AM] update#setState idle
[main 2:21:05 AM] update#setState checking for updates
[main 2:21:06 AM] update#setState idle
[main 3:21:05 AM] update#setState checking for updates
[main 3:21:06 AM] update#setState downloading
[main 3:21:09 AM] update#setState ready

All 12 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@Tyriar I remember you commented on bugs starting the Windows version of Code from WSL. I only look into launching the Linux version. Does this ring a bell?

Launching through WSL will launch the win32 executable, looks like we probably need to do something so it returns to the prompt.

Opening up to PRs, the files of interest here are https://github.com/Microsoft/vscode/blob/master/resources/win32/bin/code.cmd and https://github.com/Microsoft/vscode/blob/master/resources/win32/bin/code.sh

Related: https://github.com/Microsoft/vscode/issues/13138

And I need to press ctrl + c to get rid of it if I want to use the terminal during coding.

Even this doesn't solve the problem for me. Apparently VSCode checks for updates every hour. Here's the output from an idle terminal with VSCode open. I think this needs to be solved soon.

[main 4:21:06 PM] update#setState idle
[main 5:21:05 PM] update#setState checking for updates
[main 5:21:06 PM] update#setState idle
[main 6:21:05 PM] update#setState checking for updates
[main 6:21:06 PM] update#setState idle
[main 7:21:05 PM] update#setState checking for updates
[main 7:21:06 PM] update#setState idle
[main 8:21:05 PM] update#setState checking for updates
[main 8:21:06 PM] update#setState idle
[main 9:21:05 PM] update#setState checking for updates
[main 9:21:06 PM] update#setState idle
[main 10:21:05 PM] update#setState checking for updates
[main 10:21:06 PM] update#setState idle
[main 11:21:05 PM] update#setState checking for updates
[main 11:21:06 PM] update#setState idle
[main 12:21:05 AM] update#setState checking for updates
[main 12:21:06 AM] update#setState idle
[main 1:21:05 AM] update#setState checking for updates
[main 1:21:06 AM] update#setState idle
[main 2:21:05 AM] update#setState checking for updates
[main 2:21:06 AM] update#setState idle
[main 3:21:05 AM] update#setState checking for updates
[main 3:21:06 AM] update#setState downloading
[main 3:21:09 AM] update#setState ready

I figured out that this is actually the output of the main Log of VSCode. The question could now be phrased in a better manner - something like "VSCode leaks main log output to WSL Terminal".

I figured out that this is actually the output of the main Log of VSCode. The question could now be phrased in a better manner - something like "VSCode leaks main log output to WSL Terminal".

@nikhilweee I put your comment in the thread

I see this output even when launching from an ordinary command window.

FYI: On Windows 10 when starting code from PowerShell, if I execute code.exe I get the log output, but if I execute code.cmd I do not get the log output.

@ajkurtz this is expected as code.cmd is the CLI, code.exe is the Electron executable and shouldn't be on the PATH.

I used to open code from CMD and when I close the CMD, the VS code is also closing (CMD is kind of acting as parent for vs code)

I have the same issue here, using windows 10 and WSL.
But I noticed something very interesting that could help here. When I open vs Code first then open the desired project from the terminal, it works just fine and there's no update#setState idle.

Was this page helpful?
0 / 5 - 0 ratings