I get this error:
code .
is not recognised as an external or internal command, operable program or batch file
After installation, you need to restart your computer to make the PATH changes effective. Post restart, the command worked for me.
It looks as if you do not have the code
program installed. You can open the Command Palette,
And search "install command", which should return this as one of the options:
Run that, and it should install the code
command, after which you should be able to use it.
in windows problem is with insiders version of VSC. You can use 'code-insiders .' command or make a copy of 'code-insiders.cmd' file as 'code.cmd' inside folder with code-insider (use 'path' command to see where your VSC is installed)
make sure you run the command in C folder
Then click window key + R and type rundll32.exe sysdm.cpl,EditEnvironmentVariables
then enter .
It will open Environment Variables edit Path variable .
Check whether you have C:\Users\{pc name}\AppData\Local\Programs\Microsoft VS Code\bin
if not add it and run code -v in C folder cmd
This worked for me !
I found it. In the "search" type environment variables
then click on the "edit system environment variables".
Inside Environment variables->Path
put C:\Users\{your_username}\AppData\Local\Programs\Microsoft VS Code\bin
.
Go to the project folder and open the cmd
with it typing in the location bar and then type code .
That will do.
For Mac OS,
You can paste this into your terminal, or in your .bashrc
file (or whatever shell config file you are using) :
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"