Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a shell command prompt inside Visual Studio Code?

When using Visual Studio Code, how do I run command-line programs, such as a choco (Chocolatey) command? Do I need to have a separate Command Line (CMD.exe) running outside VS Code, or is there a hotkey/window within Code where I can run those commands?

I see the "Command Palette", but it is not entirely clear what command engines run in that palette.

like image 841
Dan Sorensen Avatar asked May 01 '15 04:05

Dan Sorensen


People also ask

How do I open the shell window in Visual Studio?

The Visual Studio terminal is built on top of Windows Terminal. To open the terminal in Visual Studio, select View > Terminal.

How do I open an existing terminal in VS Code?

Launch the VS code app then press “Ctrl+`” to open a terminal. Press “Command” or “Ctrl” + “Shift” + “p” to access the “Command Palette.” A search bar will pop-up, enter a search for “View: Toggle Integrated Terminal command,” and select it. This command toggles between displaying the terminal panel in and out of view.

How do I run a sh file in Visual Studio code?

In this case it's simple : add your . sh script file to your Visual Studio solution one way or another, then right-click on it in the Solution Explorer, and select « Open With… ». This will determine what program gets called when you double click on the file in this view.


2 Answers

For integrated console use Ctrl+`

From the release notes:

With the May release, we are rolling out the initial version of an integrated terminal. You can open the terminal using Ctrl+`, from the View | Toggle Integrated Terminal menu, or from the View > Toggle Integrated Terminal command in the Command Palette.

https://code.visualstudio.com/updates#_workbench

like image 159
brady321 Avatar answered Oct 22 '22 02:10

brady321


Use CMD+Shift+C or CTRL+Shift+C but it will only open a new outside editor standard bash console.

I hope they will implement an integrated console.

like image 23
MCBL Avatar answered Oct 22 '22 02:10

MCBL