In this tutorial, we will go through the steps to installing Visual Studio Code (VS Code) onto the Raspberry Pi.
Visual Studio Code is one of the best code editors that you can run on your Raspberry Pi.
The code editor is packed with numerous features and contains everything you need to write code on your device confidently.
In addition to Visual Studio Codes baked-in features, there is also a wealth of add-ons that you can use to extend its functionality even further.
Best of all, Visual Studio Code on the Raspberry Pi is officially supported by the development team.
This official support means the software should continue to receive updates and function well on the device.
Visual Studio Code is our favorite code editor both on the Raspberry Pi and off it. We highly recommend it for anyone who is looking for a versatile code-editor.
Below are all the equipment pieces that we used to set up VS Code on the Raspberry Pi.
Raspberry Pi 2 or newer
Main Features of Visual Studio Code
Many features of Visual Studio Code make it stand out from alternatives. One of the best parts is that it’s completely free and very customizable.
Open Source & Free
An exciting part of VS Code is that it is open-source. You can view the entirety of the code on GitHub if you want to follow the code editor’s development.
Visual Studio Code is registered under the MIT license giving you the flexibility to fork and edit the code.
This feature is super handy if you want to use version control with your code.
It works with Git and other SCM (Software Configuration Management) providers. It allows you to review diffs, stages, and commit files from within the editor.
You can debug your code within the editor, which helps reduce the amount you need to rely on print statement debugging.
Using VS Code, you can add breakpoints, view call stacks, and make use of a handy debug console.
Extensible and Customizable
One of the coolest features of Visual Studio Code is how extensible the code editor is.
For example, you can install new language packs, themes, debuggers, formatting tools, and so much more.
Each of the extensions you add is separated into their own process so that they won’t slow down the editor.
Installing Visual Studio Code
In this section, we will show you how to install Visual Studio code on your Raspberry Pi.
To achieve this, you will need to have a web browser installed to your Raspberry Pi, such as Chromium.
You will be using this web browser to download the latest available package of Visual Studio Code.
1. Within your favorite web browser on the Raspberry Pi, go to the Visual Studio Code website.
2. Once on the website, you should scroll down until you see the download buttons, as shown below.
In our case, we have two different architectures that we can choose from. One is the base ARM build, and the other is the ARM64 build.
If you are running the standard edition of Raspberry Pi OS (Non-64-bit edition), then click the “
ARM” download button (1.).
Alternatively, if you are using the 64-bit edition of the Raspberry Pi OS, make sure you click the “
ARM 64” option (2.).
.deb file to somewhere easy to locate on your Raspberry Pi.
In our case, we downloaded this package file for Visual Studio Code to the standard “
downloads” folder for our
3. With the
.deb package file for Visual Studio Code downloaded to your Raspberry Pi, we can now install it.
To start the install process, locate where you downloaded the VS Code package file, then double-click it.
In our case, we downloaded the file to the “
Double-clicking the file will begin the installation process.
4. You will first be greeted by a message asking if you want to install the file.
Verify that the deb package name is correct, then click the “
5. As we downloaded the Debian package straight from the internet with no package keys, you will be required to complete some additional authentication.
When prompted, type in the password for the
pi user (1.). By default, this password will be set to “
Once you have entered the user’s password, click the “
OK” button (2.) to proceed with the installation of Visual Studio Code.
6. The operating system will now download and install Visual Studio Code to your Raspberry Pi.
During this process, the package manager will also install any dependencies that VS Code may require.
Once the installation process has finished, you can now run Visual Studio Code on the Raspberry Pi.
Running Visual Studio Code on your Raspberry Pi
In this section, you will see how you can launch VS code on your Raspberry Pi.
1. On your Pi’s desktop, open the start menu by clicking the Raspberry icon in the top left corner.
2. Within the start menu, you need to hover over the “
Accessories” option (1.). Hovering over this option will show an additional sub-menu.
Within the additional menu that pops up, find and click “
Visual Studio Code“.
3. Hopefully, you should now have Visual Studio Code opened on the Raspberry Pi.
You can now start coding to your heart’s desire on the Raspberry Pi. Quickly you will realize why Visual Studio Code has become a favorite amongst many avid programmers.
We hope that this tutorial on installing Visual Studio Code on the Raspberry Pi has shown you all the steps to setting up this versatile code editor.
If you have any thoughts, tips, or anything else, please feel free to comment below.