Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code starting from command line batch prints out "update#setState" every hour

my Batch looks like this

@Start "VisualStudioCode" "C:\Program Files\Microsoft VS Code\Code.exe" %*

in the command windows i got every hour a message:

[main 12:14:41] update#setState idle
[main 13:14:39] update#setState checking for updates
[main 13:14:40] update#setState idle
[main 14:14:39] update#setState checking for updates
[main 14:14:43] update#setState idle
[main 15:14:39] update#setState checking for updates
[main 15:14:41] update#setState idle
[main 16:14:39] update#setState checking for updates
[main 16:14:40] update#setState idle
[main 17:14:39] update#setState checking for updates
[main 17:14:41] update#setState idle

how can i supress these messages?

like image 459
gsxr1300 Avatar asked Apr 05 '18 15:04

gsxr1300


People also ask

How do I turn off auto update VS Code?

If you do not want to get automatic updates, you can set the Update: Mode setting from default to none . To modify the update mode, go to File > Preferences > Settings (macOS: Code > Preferences > Settings), search for update mode and change the setting to none .

How start VS Code in CMD?

Launching from the command line# You can also run VS Code from the terminal by typing 'code' after adding it to the path: Launch VS Code. Open the Command Palette (Cmd+Shift+P) and type 'shell command' to find the Shell Command: Install 'code' command in PATH command.

How do you display output in terminal or code?

Open your C code file in Text Editor, then use shortcut Ctrl+Alt+N , or press F1 and then select/type Run Code , or right click the Text Editor and then click Run Code in context menu, the code will be compiled and run, and the output will be shown in the Output Window.


2 Answers

Try running "C:\Program Files\Microsoft VS Code\bin\Code.cmd" instead, as this is the CLI version. Code.exe is the electron app that should not be in the path.

like image 119
Jeffrey Harmon Avatar answered Sep 24 '22 02:09

Jeffrey Harmon


The solution for me was to remove:

D:\Users\<me>\AppData\Local\Programs\Microsoft VS Code\

from my path and add:

D:\Users\<me>\AppData\Local\Programs\Microsoft VS Code\bin

Now when I type'code' it launches code.cmd, not code.exe. (My paths are for the per-user version. Adjust for system-wide version as necessary)

like image 24
pduncan Avatar answered Sep 21 '22 02:09

pduncan