Visual Studio Code (VS Code) is used to debug and run codes of different programming languages. It provides a user-friendly interface that helps the users to write and manage their programming codes.
Visual Studio Code comes with a built-in debugger for different programming languages, also it helps the users to set breakpoints and inspect variables in their codes.
Visual Studio Code can be installed on Windows, MacOS, and Linux distributions. This is one of the reasons why developers make it their choice.
Which Installation Methods for Visual Studio Code can be Used on Debian 12?
Visual Studio Code can be installed on Debian 12 by the below-mentioned methods:
Method 1: Installation of VS Code Using the Snapcraft Package
For installing the Visual Studio Code on Debian 12 is by downloading its snap from Snapcraft nd to do so, follow the below-mentioned steps.
Step 1: Install snapd Package
First, install the snapd package to download and manage the snap from Snapcraft:
$ sudo apt install snapd -y
Step 2: Download and Install Snap of VS Code
To download and install the snap of VS Code from Snapcraft, use the command:
$ sudo snap install code --classic
The package has been successfully installed on Debian 12.
What is the Method to Remove the Visual Studio Code on Debian 12?
To remove the installed snap of the Visual Studio Code on Debian 12, execute the command:
$ sudo snap remove code
Method 2: Install Visual Studio Code on Debian 12 by Using the Flathub Package
Similarly to the snapcraft, use the “flatpak” to download and install the Visual Studio Code package from Flathub.
Step 1: Install the flatpak Package Manager
First, install the flatpak package manager:
$ sudo apt install flatpak -y
Step 2: Download and Install VS Code
Now download the package of VS Code from flathub and install it using the flatpak package manager:
$ flatpak install flathub com.visualstudio.code
How to Uninstall and Remove the VS Code on Debian 12?
To uninstall the Visual Studio Code with the Flatpak package manager, run the command:
$ flatpak uninstall flathub com.visualstudio.code
Method 3: Installation of VS Code Using the Debian Package
The last installation method of Visual Studio Code on Debian 12 is using its Debian package with the mentioned steps.
Step 1: Download the Debian Package
First, open the official website of the VS Studio and download the Debian package:
Step 2: Confirm the Download
To confirm the download, list down the Download’s directory contents:
$ cd Downloads && ls
Step 3: Install the VS Code
Finally, run the below-mentioned command to install the Debian package of VS Code:
$ sudo apt install ./code_1.80.2-1690491597_amd64.deb
The Visual Studio Code has been installed on Debian 12.
What is the Usage of Visual Studio Code on Debian 12?
To use the Visual Studio Code on Debian 12, we will write and compile a simple C++ programming Code. Launch the installed application of the Visual Studio Code on Debian 12:
$ code
Now install the desired programming languages extensions; create a new file, type the programming script, and run the code either with or without debugging it.
Conclusion
To install the Visual Studio Code on Debian, download its Debian package from the link and install it with the command ”sudo apt install ./file_name”. Flathub and Snapcraft packages of VS Code can also be used. All the mentioned methods are explained in the step-by-step guide in this post for the better understanding of readers. Also, the usage of the VS Code has been explained by writing and running the simple C++ code.