I am using a portable version of VSCode, which means that the VSCode installation directory is not on PATH. However, quite a few VSCode extensions, scripts, etc., assume that if you run the command "code" or "code.exe" you will get a VSCode from somewhere. Generally you won't find one, or worse, if there is a default version install, you will find the wrong one. How can I add VSCode's base directory to PATH? It seems like there is a way in MacOS, with the "Install code in PATH" command, but there doesn't seem to be one for Windows.
Asked
Active
Viewed 82 times
1 Answers
0
As of July 2023, this and this don't seem to work well for VSCode Portable
.
What works is an amendment of this, editing the %PATH%.
Essentially, the bin
is not required as Code.exe
is now in the main folder.
VSCode: 1.80
For Windows: Go to Environment Variable, add "path_to_vscode\VSCode-win32-x64-1.80.0"
to PATH
; whether user variable
or system variable
.
Alternatively, create a code
variable and add the portable VSCode path.
This gif provides visual illustration.
***However, do not include the bin
subfolder!

semmyk-research
- 333
- 1
- 9