How to Install Visual Studio Code on Debian 10

Posted 

2 min read

Visual Studio Code is a free and open-source cross-platform code editor developed by Microsoft. It has built-in debugging support, embedded Git control, syntax highlighting, code completion, integrated terminal, code refactoring, and snippets. Visual Studio Code functionality can be extended using extensions.

This tutorial describes how to install Visual Studio Code editor on Debian 10, Buster.

Prerequisites

The instructions assume that you are logged in as a user with sudo privileges.

Installing Visual Studio Code on Debian

The easiest and recommended way to install Visual Studio Code on Debian 10 systems is to enable the VS Code repository and install the VS Code package through the command line:

  1. Start by updating the packages index and installing the dependencies by typing:

    sudo apt updatesudo apt install software-properties-common apt-transport-https curl
  2. Import the Microsoft GPG key using the following curl command:

    curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

    On success, the command will return OK.

  3. Add the Visual Studio Code repository to your system:

    sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
  4. Install the Visual Studio Code package with:

    sudo apt updatesudo apt install code

That’s it. Visual Studio Code has been installed on your Debian desktop, and you can start using it.

Launching Visual Studio Code

VS Code can be launched from the command line by typing code or by clicking on the VS Code icon (“Applications -> Programming -> Visual Studio Code”).

When you start VS Code for the first time, a window like the following will be displayed:

You can now begin installing extensions and configuring VS Code according to your preferences.

Updating Visual Studio Code

When a new version of Visual Studio Code is released you can update the package through your desktop standard Software Update tool or by running the following commands in your terminal:

sudo apt updatesudo apt upgrade

Conclusion

We’ve shown you how to install VS Code on Debian systems. Your next step could be to install Additional Components and customize your User and Workspace Settings.

If you have any questions, please leave a comment below.