How to Install VS Code on Debian 13 “Trixie”

Step-by-step instructions for installing Visual Studio Code on Debian 13 “Trixie,” helping you set up your coding environment in minutes.

Microsoft Visual Studio Code, an open-source cross-platform code editor, hardly needs an introduction—it’s the go-to option for millions of developers worldwide. It’s lightweight yet powerful, featuring syntax highlighting, smart code completion, debugging tools, Git integration, and support for thousands of extensions.

If you’re running Debian 13 “Trixie” and looking for a straightforward way to install it, well… you’re in the right place. In this guide, I’ll walk you through simple, proven step-by-step instructions for installing VS Code on Debian 13. In just a few minutes, you’ll be all set to start coding right away.

Install VS Code on Debian 13 “Trixie”

Visual Studio Code isn’t included in the Debian repositories because, although the core of VS Code is open source, the official binaries distributed by Microsoft include extra proprietary components and some Microsoft-specific licensing terms.

At the same time, Debian has very strict rules about software freedom, licensing, and redistribution. Due to the inclusion of these proprietary parts, the official VS Code package doesn’t meet Debian’s Free Software Guidelines (DFSG). But don’t worry—you can still get it. Here I’ll show you how to install it directly from the official Microsoft repository.

Step 1: Install Prerequisites

Before we begin, we must install some packages that will be required for our Debian 12 system to proceed with the next steps. Type the following APT commands to install prerequisites:

sudo apt install apt-transport-https wget gpgCode language: Bash (bash)

Step 2: Import Microsoft’s GPG Key

Import the GPG key from the Microsoft repository to ensure the authenticity of the software we install from it.

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/packages.microsoft.gpg
Code language: Bash (bash)
Import Microsoft’s repository GPG Key.
Import Microsoft’s repository GPG Key.

Notice that the command produces no output.

Step 3: Add the Official Microsoft VS Code Repository

After importing Microsoft’s GPG keys, we’ll add the official Visual Studio Code repository to our Debian 13 system. This implies that the update package will be made available with the rest of your system’s regular updates if a new version is released.

sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'Code language: Bash (bash)
Add the VS Code repository.
Add the VS Code repository.

Again, the command above doesn’t produce any output.

Step 4: Refresh Package Base

Before we proceed with VS Code installation on our Trixie system, we should refresh the list of available packages. Run the command below to update the APT repositories index.

sudo apt updateCode language: Bash (bash)
Updating the list of available packages.
Updating the list of available packages.

As you can see, our new VS Code repository is now available and ready for use.

Step 5: Install VS Code on Debian 13 “Trixie”

We’re all set to install the most up-to-date Visual Studio Code release on our Debian 13 system. Run the following commands:

sudo apt install codeCode language: Bash (bash)
Installing VS Code on Debian 13.
Installing VS Code on Debian 13.

Wait for the installation to complete. Congratulations, we are done!

Running VS Code on Debian 13 “Trixie”

You can start using Visual Studio Code by launching it from the desktop environment’s application menu.

Starting VS Code.
Starting VS Code.
Visual Studio Code is installed and runs on Debian 13 “Trixie”.
Visual Studio Code is installed and runs on Debian 13 “Trixie”.

Uninstall VS Code

If you want to uninstall VS Code from your Debian 13 box for any reason, you can easily do so by running the command below.

sudo apt purge codeCode language: Bash (bash)

Why Not Install as a Flatpak?

Yes — installing VS Code as a Flatpak works fine, but it does come with a few trade-offs compared to using the DEB package from Microsoft’s repo. For this reason, I highly recommend sticking to the native package. Here are the main disadvantages:

  • Performance overhead: Flatpak apps can be slightly heavier in terms of disk space and startup time, as they bundle runtimes.
  • File system sandboxing: By default, Flatpak restricts access to your system files. This means you may encounter issues with VS Code extensions that require access outside the sandbox (e.g., Docker, system compilers, or specific language servers). You can work around this with Flatpak permissions, but in any case, it’s a headache.
  • Integration quirks: Some features, such as detecting system-wide SDKs, toolchains, or debuggers, may not work out of the box due to the sandbox.

Conclusion

That’s all, folks! With Visual Studio Code up and running on your Debian 13 “Trixie” system, you’re ready to start coding by using one of the best code editors out there. Hopefully, this guide gave you the jumpstart you needed. To learn more about VS Code, visit its official documentation page.

Thanks for your time. As always, your feedback and comments are most welcome. Happy coding!

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *