Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening Microsoft Visual Studio Code from command prompt Windows

Tags:

Is there a way to launch Microsoft Visual Studio Code from the command line in windows? I can't even seem to find the directory for code on my computer. It didn't even ask me where to download it.

like image 727
John Avatar asked Apr 29 '15 22:04

John


People also ask

How do I start Visual Studio from command line?

On the Start screen, press Ctrl+Tab to open the Apps list, and then press V. This brings up a list that includes all installed Visual Studio command prompts.

What is the command to directly open Visual Studio code from the command prompt?

To get an overview of the VS Code command-line interface, open a terminal or command prompt and type code --help .

How do I open Visual Studio code in terminal?

Visual Studio Code includes a fully-featured integrated terminal that conveniently starts at the root of your workspace. It provides integration with the editor to support features like links and error detection. To open the terminal: Use the Ctrl+` keyboard shortcut with the backtick character.


2 Answers

Navigate to the directory that you want to open and type code . to launch VS Code.

like image 56
kspearrin Avatar answered Oct 01 '22 17:10

kspearrin


As many folks already suggested ways to open code from command prompt using code . command. This will only open Visual Studio Code Stable build. But If you have downloaded Visual Studio Code Insider build/version (Which has all latest build/features but unstable version) then you need to follow below instructions in windows :

  • Go to Control Panel\System and Security\System. Click on Advanced System Settings enter image description here
  • Click on Environment Variables enter image description here
  • Under System Variables tab, Click on Edit for Path Variable enter image description here
  • Add a new path C:\Users\tsabu\AppData\Local\Programs\Microsoft VS Code Insiders\bin (or) C:\Program Files\Microsoft VS Code Insiders\bin based on location at which you have installed vscode insider in your machine. enter image description here

    Open a new command prompt and type code-insiders . to open vscode-insider build/version
like image 24
Sabunkar Tejas Sahailesh Avatar answered Oct 01 '22 18:10

Sabunkar Tejas Sahailesh