What is Visual Studio Code?

Completed

Visual Studio Code is a free, lightweight source code editor that can be customized through extensions to support many different programming needs.

What are the main features of Visual Studio Code?

Among all your choices of code editors and IDEs, Visual Studio Code provides some of the best features of both types of tools. Like many code editors, it has a small installation footprint so it starts up quickly and provides a fast, responsive editing experience. Like many IDEs, Visual Studio Code supports debugging tools, source control integration, and hundreds of programming languages. And Visual Studio Code provides these capabilities without the overhead that full-featured IDEs often have that make them slow to load and work with.

Let's take a look at the key features of Visual Studio Code:

Cross-platform support

Visual Studio Code's user interface (UI) is based on Electron, a cross-platform technology for building desktop applications. This technology lets Visual Studio Code run on Linux, macOS, or Windows. The benefit of this versatility is that you can use the same familiar coding environment on whatever platform you're using.

For example, you can use Visual Studio Code as you work on a web application on Windows. Later, if you need to work from a Linux host, you can install and use Visual Studio Code there to edit Python scripts. You don't have to learn how to use different editors to work on different operating systems.

The following screenshot shows the Windows, Linux, and macOS downloads available on the Visual Studio Code home page:

Screenshot of Visual Studio Code website showing downloads available in Linux, macOS, and Windows.

Visual Studio Code's editor is based on the Monaco Editor technology that provides a workbench to create and edit code. The editor has rich features such as code syntax coloring, bracket matching, and IntelliSense as shown in the following screenshot. These features help you write and refactor your code more efficiently.

Screenshot of Visual Studio Code interface showing code syntax coloring, bracket matching, and IntelliSense.

Explorer

Visual Studio Code has an explorer to organize and manage files and folders containing your code. This feature enables you to create, save, find, and open files and folders without having to switch to a file manager application.

Screenshot of Visual Studio Code with Explorer icon selected in the Activity Bar.

You can use Visual Studio Code's search capability to look for terms within a file or across multiple files. The search feature also provides advanced options for matching patterns. For example, you could exclude HTML file types from your search by specifying the pattern **/*.html.

In addition, you can search for and replace terms within a file or multiple files as shown in the following screenshot:

Screenshot of Visual Studio Code with Search view displayed in Side Bar.

Integrated terminal

Visual Studio Code integrates your system terminal within the UI so that you can run commands within your working directory without having to switch to another window or application. For example, while working on a web application, you can run Node package manager (npm) commands without having to open a separate terminal window.

Screenshot of Visual Studio Code with Terminal window displayed at bottom of UI.

Integrated debugger

Visual Studio Code integrates with many debuggers so that you can run and debug code within the UI. You can set breakpoints and inspect the values of variables, and you can use the Debug Toolbar to help you start debugging, pause, or step through code.

Screenshot of Visual Studio Code in debug mode with Debug Toolbar visible.

Integrated source control

Visual Studio Code lets you manage your code with Git-compatible tools. You can perform actions such as committing changes to repositories that reside in a remote source control management (SCM) provider such as GitHub. You can run Git commands in the Visual Studio Code's integrated terminal or use the GUI-based Git tools in the Source Control view.

Screenshot of Visual Studio Code in with the Source Control view displayed.

Extensibility through extensions

You can add more features and functionality beyond what's in the initial download of Visual Studio Code. You can add support for other programming languages, frameworks, themes, and tools. For example, a few of the many C++ extensions available in the Marketplace are displayed in the following screenshot:

Screenshot of Visual Studio Code with the Extensions Marketplace view displayed.

Next, let's take a look at how to use these features of Visual Studio Code.