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 gpg
Code 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)

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)

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 update
Code language: Bash (bash)

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 code
Code language: Bash (bash)

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.


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 code
Code 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!
Why “But don’t worry” when it should be worried
— QUOTE BEGIN —
VS Code’s source code is available on GitHub. Yet when you download the VS Code application from Microsoft, you’ll find that your download is licensed under the Microsoft Software License. This isn’t an open source license. The difference is in the build process.
Chris Dias, a Microsoft developer on the VS Code project, makes a comparison between VS Code and, for instance, the Chrome browser and its open source “upstream” project, Chromium. VS Code is indeed built upon an open source codebase. The official Microsoft-branded release is customized with Microsoft-specific functionality, including a trademark, an extensions gallery, a proprietary C# debugger, and telemetry. But when you clone and build the code yourself, none of these targets is configured, so you generate a “clean” version, which is called Code – OSS (OSS stands for open source software).
In practice, the differences between VS Code and Code – OSS are minimal. Most notably, VS Code includes telemetry, which is tracking software. It’s unlikely that Microsoft is literally tracking your every move, and there’s lots of software out there these days that gathers usage data. Whether or not you care about VS Code’s telemetry is up to you. If you’d rather do without the usage tracking, here are some great (and open source) alternatives to VS Code.
— QUOTE END —
https://opensource.com/article/20/6/open-source-alternatives-vs-code
or
— QUOTE BEGIN —
The open-source version of VSCode, known as Code – OSS, is available on GitHub under the MIT License. Unlike the official VSCode release, which includes proprietary Microsoft modifications and telemetry, Code – OSS allows users to compile and use the editor in a fully open-source manner. Many Linux distributions, such as Ubuntu and Fedora, offer Code – OSS through their native package managers (e.g., `apt` or dnf), ensuring a telemetry-free experience.
— QUOTE END —
https://undercodetesting.com/open-source-version-of-vscode-a-comprehensive-guide/
and more…
I personally hasn’t been brave enough to install/try it even on VM (mostly because trying to avoid ms stuff)…
Types: deb
URIs: https://packages.microsoft.com/repos/code
Suites: stable
Components: main
Architectures: amd64 arm64
Signed-By: /etc/apt/keyrings/packages.microsoft.gpg
You can also just use extrepo to install VSCode.
sudo apt install extrepo
sudo enable extrepo vscode
sudo apt install code
Hmm, I thought Debian 13 uses deb822 format for repository files.
It’s now the preferred format for repo definitions, but the old “one line per repo” style still works in Trixie for backward compatibility.