Home Raspberry Pi How to install Visual Studio Code on Raspberry Pi

How to install Visual Studio Code on Raspberry Pi

The Raspberry Pi is a great little productivity machine, and often, the focus of the users is on programming. However, good news hit the userbase earlier this year when it was announced that Microsoft Visual Studio Code was coming to Raspberry Pi OS. Visual Studio Code is one of the most used code editors used worldwide, and it coming to our favorite single-board computer makes things that much more fun.

Visual Studio Code Features

The interface of Visual Studio Code is focused on productivity. The main portion of the window contains the code itself. On the left of that code canvas, there is the helpful option condensed to single icons, which reveal their names when you hover over them. On the right, there is the an ‘at a glance’ view of your code.

VSC Interface

VSC Interface

There is a status bar on the lower side of the window, which tells you useful information such as the version of the compiler you are using, the number of errors, the position of your cursor, the length of a tab, notifications, etc.

Overall, the interface feels very snappy, especially considering it is a full-fledged heavy editor on a Raspberry Pi. You can get your work done very quickly, even if you’re new to it, and once you uncover all the minute details, you will attain a great workflow.

Visual Studio Code is known for its fantastic set of features. Apart from the usual easy access to the basic features such as find and replace, file explorer, syntax highlighting, etc., it contains other features that will take your experience to the next level.

Built-In Git

This is something that will allow most of the programmers to take a breath of relief. You can directly connect the Visual Studio Code on your Raspberry Pi OS to your Git repository without worrying about file management. Git is a vital tool for developers, especially open source developers, and using Git makes things much more manageable.

VSC Built-In Git

VSC Built-In Git

Run and Debug

You can use the run and debug option on VSC to check for your code’s bugs. Most popular languages will have the configuration built-in as to what to check for, which will not be a problem. However, if you are unsatisfied with the default, you can add your exceptions to look for so that you don’t miss a single thing in your debugging process.

VSC Debugging

VSC Debugging

Extensions

VSC provides a wide range of extensions to the users to add to the usability of the editor. The management of extensions can directly be done by the editor itself. Several categories of the extensions are provided like machine learning, data science, themes, programming language support, keymaps, and even extension packs. These take care of any requirements you might have. For example, the Vim keymap extension allows you to use the Vim keyboard shortcuts in VSC.

VSC Extension Categories

VSC Extension Categories

Testing

You can create and install pre-existing testing packs to test your code according to your preferences. Tests are important, especially for large projects, and these testing features allow you to make sure that you have fool-proof efficient code.

In-App Terminal

For quick access to your system, you can open up a terminal right inside Visual Studio Code. Not only that, but the terminals can be opened in a split-screen, and multiple instances can be opened as well.

VSC In-App Terminal

VSC In-App Terminal

For any quick information or for those who use the terminal, this feature is quite a boon.

Command Palette

This is a unique and handy feature of Visual Studio Code. Pressing Ctrl-Shift-P brings up the Command Palette, which can be used to do anything at all. Just type in something that contains keywords according to what you want to do, and it will show you the options. For example, I want to comment on the line that I am currently on. So I search for “comment,” and VSC presents options to be that relate to that. I can choose “Add Line Comment,” and the line will be commented out.

Notice that searching the required option also shows you what keyboard combination you can use to achieve the same thing without even searching in the first place. For example, commenting out a line is as easy as pressing Ctrl-K.

VSC Command Palette

VSC Command Palette

The point of the Command Palette is to provide easy access to certain features that are otherwise difficult to navigate around. This way, you will never have to take your hands off your keyboard. Even better, if you learn the keyboard combinations to your regularly needed features, you won’t even need the Command Palette. It makes the experience much faster.

Viewing Options

VSC provides a wide range of configurations of viewing options. Open up the ‘View’ section on the top bar, and you will be able to access the various options. The Appearance section provides a ‘Zen Mode’, a fullscreen view of the code with no distractions. Apart from that, the various components of the editor (like status bar, minimap, etc.) can be toggled on and off using this section. You can split the editor into various windows if you please.

There are many more valuable features that Visual Studio Code contains which will make your experience much smoother. We encourage you to explore the editor as you use it yourself.

Installing VSCode on Raspberry Pi

The installation of Visual Studio Code on the Raspberry Pi OS is straightforward. Open up a terminal, and enter:

sudo apt install code
VSC Install

VSC Install

This will install VSC on your system.

Conclusion

Visual Studio Code is one of the best editors around, and for a good reason. Its unique features make it an excellent choice for productivity without compromising on aesthetics and usability. Getting used to it doesn’t take a long time, and it makes your programming experience a lot snappier. VSC coming to the Raspberry Pi brings an additional level of professionalism to our favorite single-board computer.

You may also like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept