Terminal (Console) Apps
There are two options for using terminals in Visual Studio Code when debugging:
-
: Use the Visual Studio Code Terminal (integrated terminal) : Use the native (OS) Terminal (external terminal)
Option 1: Integrated Terminal
- Open the file to be debugged
- From the debug configuration select Integrated Terminal/Console
- Start debugging
- The integrated terminal will be displayed (if not you can open it using instructions outlined here)
Note: All debug output will now be displayed in the Terminal/Console Window and not in the Python Debugger console.
Option 2: External Terminal
- Open the file to be debugged
- From the debug configuration select External Terminal/Console
- Start debugging
- The external terminal will be displayed
Note: All debug output will now be displayed in the Terminal/Console Window and not in the Python Debugger console.
Topics:
Terminal (Console) Apps
There are two options for using terminals in Visual Studio Code when debugging:
-
: Use the Visual Studio Code Terminal (integrated terminal) : Use the native (OS) Terminal (external terminal)
Option 1: Integrated Terminal
- Open the file to be debugged
- From the debug configuration select Integrated Terminal/Console
- Start debugging
- The integrated terminal will be displayed (if not you can open it using instructions outlined here)
Note: All debug output will now be displayed in the Terminal/Console Window and not in the Python Debugger console.
Option 2: External Terminal
- Open the file to be debugged
- From the debug configuration select External Terminal/Console
- Start debugging
- The external terminal will be displayed
Note: All debug output will now be displayed in the Terminal/Console Window and not in the Python Debugger console.
How to Open the Terminal in VS Code

By Lee Stanton
Lee Stanton Author Lee Stanton is a versatile writer with a concentration on the software landscape, covering both mobile and desktop applications as well as online technologies. Read more • Edited by Cassandra McBride Cassandra McBride Editor With over eight years of experience, Cassandra specializes in editing and technical writing. In her previous role as a technical consultant, Cassandra was responsible for writing user guides, training materials, and other documentation to support the new systems. Read more April 1, 2021
If you need to start executing commands using Visual Studio Code for your development tasks, you may need to know how to access a terminal.

In this article, we’ll walk you through how to open a Visual Studio Code terminal for coding in a variety of programming languages. Plus, we’ll cover how to find VS code extensions for coding support, and answers to other commonly asked questions.
How to Open Terminal in VS Code?
Visual Studio Code is a powerful lightweight source code editor. As well as including lots of convenient development features, it allows for coding in pretty much any programming language.
Though it comes with built-in support for all programming languages, installing extensions for each language is recommended for access to extra support features like auto-complete and quick fixes.
To access the integrated terminal from the workplace root in VS Code, do the following:
- 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 to Open Python Terminal in VS Code?
To open a VS code integrated terminal from the root of your workplace, for coding in Python:
Note: To install a Python extension; from the VS Code Welcome screen, select “Tools and Languages”. The Extensions Market Place will appear on the left; enter a “Python” search for a list of the appropriate extensions.
- 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.

- In the new terminal window, start entering your Python commands.
How to Open Java Terminal in VS Code?
To open a VS code integrated terminal from the root of your workplace, for coding in Java:
Note: To install a Java extension; from the VS Code Welcome screen, select “Tools and Languages”. The Extensions Market Place will appear on the left; enter a “Java” search for a list of the appropriate extensions.
- 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.

- In the new terminal window, start entering your Java commands.
How to Open JavaScript Terminal in VS Code?
To open a VS code integrated terminal from the root of your workplace, for coding in JavaScript:
Note: To install a JavaScript extension; from the VS Code Welcome screen, select “Tools and Languages”. The Extensions Market Place will appear on the left; enter a “JavaScript” search for a list of the appropriate extensions.
- 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.

- In the new terminal window, start entering your JavaScript commands.
How to Open Ruby Terminal in VS Code?
To open a VS code integrated terminal from the root of your workplace, for coding in Ruby:
Note: To install a Ruby extension; from the VS Code Welcome screen, select “Tools and Languages.” The Extensions Market Place will appear on the left; enter a “Ruby” search for a list of the appropriate extensions.
- 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.

- In the new terminal window, start entering your Ruby commands.
How to Open Node.js Terminal in VS Code?
To open a VS code integrated terminal from the root of your workplace, for coding in Node.js:
Note: To install a Node.js extension; from the VS Code Welcome screen, select “Tools and Languages.” The Extensions Market Place will appear on the left; enter a “Node.js” search for a list of the appropriate extensions.
- 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.

- In the new terminal window, start entering your Node.js commands.
How to Open C/C++ Terminal in VS Code?
To open a VS code integrated terminal from the root of your workplace, for coding in C/C++:
Note: To install a C/C++ extension; from the VS Code Welcome screen, select “Tools and Languages”. The Extensions Market Place will appear on the left; enter a “C/C++” search for a list of the appropriate extensions.
- 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.

- In the new terminal window, start entering your C/C++ commands.
How to Open Go Terminal in VS Code?
To open a VS code integrated terminal from the root of your workplace, for coding in Go:
Note: To install a Go extension; from the VS Code Welcome screen, select “Tools and Languages.” The Extensions Market Place will appear on the left; enter a “Go” search for a list of the appropriate extensions.
- 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.

- In the new terminal window, start entering your Go commands.
What’s the Shortcut to Open Terminal in VS Code?
Use the following shortcut to open a terminal in VS Code:
- “Ctrl” + keyboard shortcut + the backtick character ` (Ctrl+`).
How to Open Terminal in Current Directory in VS Code?
To open a terminal at the current directory in VS Code:
Install an extension like “TerminalHere” to be able to access a terminal at your current file’s directory.
- Launch VS code app, then access the folder you wish to open a terminal from.
- From the menu bar, select “View” > “Command Palette.”

- Search for the “terminalHere.create” command to create the terminal from the current file’s directory.
How to Open Terminal in VS Code in New Window?
To open a VS code terminal in a new window:
- Navigate to the VS code app and right-click on it.
- Select “open new window.”

- Then “Ctrl+`” to open a terminal in the new window.
How to Open Terminal in VS Code on Mac?
To open a VS code terminal on macOS:
- Launch the VS code app.
- Press “Ctrl+`” to open a terminal.
How to Open Terminal in VS Code on Windows?
Similarly, to opening a VS code terminal on macOS, via Windows its:
- Launch VS code app.
- Press “Ctrl+`” to open a terminal.
How to Open Terminal in VS Code as Administrator?
You would open a terminal in VS code as an Administrator the same way as a non-administrator:
- Launch the VS code app.
- Press “Ctrl+`” to open a terminal.
To run code as an administrator in Windows:
- Right-click on the VS Code app.
- Select “Run this program as an administrator.”

- Or from within a terminal, you can use the platform utility “runas.exe.”
Additional FAQs
How Do I Open a Directory in Terminal VS Code?
To automatically open the current directory in a VS code terminal:
1. Launch the VS code app, then press “Ctrl+`” to open a terminal.
2. From the menu bar, select “View” > “Command Palette.”
3. Start typing “Shell” or “Shell Command” into the search box.
4. Select “Shell Command: install “code: command in PATH.” A successful Shell command “Code” installed in PATH pop-up should appear.
5. To confirm this, if you currently have a running terminal session, quit or restart it.
6. Navigate to the directory of the files you wish to access in VS code then type “code.” (the word “code” followed by a space, then a period). The folder will open in VS code terminal automatically.
How Do I Run Code in Terminal?
To run code in a terminal across macOS, Windows, and Linux:
On Windows:
1. Press the “Windows” key + “r” to access the run program.
2. Then type in “cmd” or “command” and press enter.

3. Enter the commands for the code you wish to run.
On macOS:

2. Enter the commands for the code you wish to run.
What Is the Extension for Visual Studio?
There is an extensive range of extensions available for Visual Studio, from programming languages and debuggers to formatters and themes. To discover what’s available, navigate to the Extension Market Place in VS code.
From the VS Code Welcome screen, select “Tools and Languages.” The Extension Market Place will appear on the left-hand side of the screen.
How Do I Install an Extension for VS?
For the easiest way to find and install a VS code extension for various programming languages:
1. Launch the VS code app and the welcome screen will be displayed.
2. Select “Menu” > “View” > “Extensions” to access the Extensions Market Place.

3. Enter “@categories “programming language” to see a list of all programming languages.

4. Click on one for access to its details and the link for installation.
How to Get Terminal?
To access a terminal using Windows:
1. Press the “Windows” key + “r” to access the run program.
2. Then type in “cmd” or “command” and press enter.


Accessing Integrated Terminals in VS Code
What makes the VS Code source-editor so powerful is its ability to support almost all of the major programming languages. In just a couple of clicks, you can open an integrated terminal window to enter commands in pretty much any language of your choice.
Now that you know how straightforward it is to access a terminal in VS Code, what programming language did you use? Did you find the assistance useful or not? We want to hear about your experience using VS Code terminals; let us know in the comments section below.
Как открыть консоль в ВС код?
Чтобы открыть терминал в Visual Studio, выберите элементы . выберите Командная строка разработчика для VS 2019 или PowerShell для .
Как в Visual Studio Code открыть консоль?
Для установки интерфейса командной строки Visual Studio Code предоставляет специальную встроенную команду. Откройте палитру команд кода, нажав Command+Shift+P на Mac или Control+Shift+P в Windows и Linux. Эта комбинация клавиш откроет в верхней части окна выпадающее меню команд.
Как запустить консоль отладку в Visual Studio Code?
Нажмите клавишу F5 , чтобы начать отладку. Visual Studio Code выделит строку точки останова. На этом этапе в окне Переменные показано, что массив args пуст, а name и currentDate имеют значения по умолчанию. Выберите Запуск>Шаг с заходом или нажмите клавишу F11 .
Как открыть консоль в Visual Studio Code Mac?
Вы можете открыть окно встроенного терминала в Visual Studio для Mac из корня вашего решения. Открыть терминал можно следующими способами:Используйте сочетание клавиш CTRL + ` , чтобы отобразить или скрыть окно терминала.Используйте команду меню Вид>Терминал.Используйте команду терминал из панели поиска.8 авг. 2022 г.
Что такое Отладка VS Code?
VS Code хранит конфигурацию отладки в файле launch. json внутри папки . vscode . Чтобы VS Code создал этот файл для нас, в меню редактора откройте выпадающий список «Нет конфигураций» («No Configurations») и выберите «Добавить конфигурацию» («Add Configuration»).
Где запустить код C++?
Сборка и запуск кода в Visual Studio Для сборки проекта выберите в меню Сборка пункт Собрать решение. Окно Вывод отображает результаты процесса сборки. Чтобы запустить этот код, в строке меню выберите Отладка и Запуск без отладки. Открывается окно консоли, и запускается ваше приложение.
[VS Code minor tips] How to open a new integrated terminal with current working directory?
When you first install VSCode and open a project, you may want to build it through command line.
When I opened the integrated command line with Ctrl + Shift + ` , the terminal opened up at my home directory. Then I had to change directory to my home directory. It’s kind of cumbersome.
What if I can just open up a terminal with current working directory?
Fortunately, VS Code offers that customization!
First, go to File -> Preferences -> Keyboard Shortcuts
You will see Open Keyboard Shortcuts (JSON) button on the upper right corner. Click that icon.
Now, copy and paste the following code (or you can just append the inner configuration object to the list of your customized keymap setting.)
Now, restart the vscode and open any project you want to work on.
Open the integrated terminal and you will see the current working directory is the location of your project!