According to https://code.visualstudio.com/docs/editor/command-line, running the "code --help" command in Command Prompt should display help or usage information. However, when I run the command in Command Prompt, VS Code opens like it does when I click its icon from the taskbar. Why doesn't the "code --help" command display help when I run it in Command Prompt?
Running ">Help: About" in VS Code's palette outputs the following:
Version: 1.87.2 (user setup)
Commit: 863d2581ecda6849923a2118d93a088b0745d9d6
Date: 2024-03-08T15:20:17.278Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.19045
I can't remember if I installed VS Code via the Microsoft Store or the installer obtained by clicking on the "Download for Windows" button on https://code.visualstudio.com.
I was having the same issue with VSCodium. Maybe you can apply the same fix to your case. VSCode's entry in the PATH
variable should end with \bin sub-directory in VSCode's installation instead of the root directory of the installation.
In other words, you should run VSCode via .\bin\code.cmd instead of code.exe from the parent directory.
It's not yet completely clear to me why this happens, but there are a bunch of related open issues linked from this one, for example: https://github.com/Microsoft/vscode/issues/66750
Please be aware that doing this causes a diffrent issue: https://github.com/Microsoft/vscode/issues/66750#issuecomment-1549142833