Visual Studio Code on Windows does not work properly

My question is how to make the VS Code command line work properly when manually adding it to PATH on Windows?

Inside Visual Studio code, I first tried installing it with the “install in PATH” checkmark, but when I typed code on the command line, it said that the command was not recognized. So I manually edited PATH and added C:\Program Files (x86)\Microsoft VS Code .

However, when executing commands such as:

 code -v 

the command line does not print anything, but instead runs Visual Studio code.

+6
source share
1 answer

Your path environment variable should contain C:\Program Files (x86)\Microsoft VS Code\bin instead of C:\Program Files (x86)\Microsoft VS Code (note the added \bin at the end).

The bin code.cmd provides the code.cmd batch file, which processes the command line before running code.exe from the parent directory. For the command line to work correctly, you must go through the batch file.

+10
source

Source: https://habr.com/ru/post/1264908/


All Articles