# Visual Studio Code for the Raspberry Pi

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/097/228/medium800/raspberry_pi_Screenshot_from_2020-11-24_13-13-31.png?1606242783)

In this guide, you'll learn how to install and use Microsoft's Visual Studio Code on the Raspberry Pi. Visual Studio Code, often shortened to VS Code, is an integrated development environment (IDE) that has a bunch of handy features that make writing code more straightforward, such as syntax highlighting, code completion, easier refactoring, and git built-in.

## Setting Up Your Raspberry Pi
The Raspberry Pi Foundation has excellent guides on how to set up your Raspberry Pi Computer to include the cabling, power, and software (Raspberry Pi OS).

- [Raspberry Pi Board Computer Setup](https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up)

## Parts
You will want a Raspberry Pi computer, hooked up to a monitor along with a keyboard and mouse. To do this, it is easiest to use one of the full size models such as the Raspberry Pi 3, 3B, or 4. The installation can be on any Raspberry Pi but the newer models will run faster which means better response. The Pi Zero W works also but requires a USB hub to get the mouse and keyboard to both work at the same time. The Raspberry Pi 400 contains a keyboard, only needing a mouse and HDMI monitor.

Featured
### Raspberry Pi 3 - Model B - ARMv8 with 1G RAM

[Raspberry Pi 3 - Model B - ARMv8 with 1G RAM](https://www.adafruit.com/product/3055)
Did you really think the Raspberry Pi would stop getting better? At this point, we sound like a broken record, extolling on the new Pi’s myriad improvements like we’re surprised that the folks at the Raspberry Pi Foundation are continuously making their flagship board better.&nbsp;...

In Stock
[Buy Now](https://www.adafruit.com/product/3055)
[Related Guides to the Product](https://learn.adafruit.com/products/3055/guides)
![Angled shot of Raspberry Pi 3 - Model B.](https://cdn-shop.adafruit.com/640x480/3055-04.jpg)

Featured
### Raspberry Pi 4 Model B - 4 GB RAM

[Raspberry Pi 4 Model B - 4 GB RAM](https://www.adafruit.com/product/4296)
The Raspberry Pi 4 Model B is the newest Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 4 better than the 3? How about a&nbsp;_faster_ processor, USB 3.0 ports, and updated Gigabit Ethernet chip with...

In Stock
[Buy Now](https://www.adafruit.com/product/4296)
[Related Guides to the Product](https://learn.adafruit.com/products/4296/guides)
![Angled shot of Raspberry Pi 4](https://cdn-shop.adafruit.com/640x480/4296-11.jpg)

Featured
### Raspberry Pi 4 Model B

[Raspberry Pi 4 Model B](https://www.adafruit.com/product/4297)
The Raspberry Pi 4 Model B is the newest Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 4 better than the 3? How about a&nbsp;_faster_ processor, USB 3.0 ports, and updated Gigabit Ethernet chip with...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4297)
[Related Guides to the Product](https://learn.adafruit.com/products/4297/guides)
![Angled shot of Raspberry Pi 4](https://cdn-shop.adafruit.com/640x480/4297-02.jpg)

Featured
### Raspberry Pi 400 Desktop - Computer Only

[Raspberry Pi 400 Desktop - Computer Only](https://www.adafruit.com/product/4795)
Raspberry Pi 400 is a complete Raspberry Pi 4-based personal computer, integrated into a keyboard. The Pi 4 is the first computer from the Pi Foundation that really feels 'desktop computer' speed - you can use it as an every day computer at a great price!

Normally you'd need...

In Stock
[Buy Now](https://www.adafruit.com/product/4795)
[Related Guides to the Product](https://learn.adafruit.com/products/4795/guides)
![Angled shot of a Raspberry Pi 400 Desktop.](https://cdn-shop.adafruit.com/640x480/4795-06.jpg)

Featured
### Raspberry Pi 400 Desktop - Full Computer Kit

[Raspberry Pi 400 Desktop - Full Computer Kit](https://www.adafruit.com/product/4796)
Raspberry Pi 400 is a complete Raspberry Pi 4-based personal computer, integrated into a keyboard. The Pi 4 is the first computer from the Pi Foundation that really feels 'desktop computer' speed - you can use it as an every day computer at a great price!

Normally you'd need...

In Stock
[Buy Now](https://www.adafruit.com/product/4796)
[Related Guides to the Product](https://learn.adafruit.com/products/4796/guides)
![A collection of electronic parts included in kit.](https://cdn-shop.adafruit.com/640x480/4796-12.jpg)

# Visual Studio Code for the Raspberry Pi

## VS Code Installation

Open the terminal with **ctrl** + **alt** + **t** , by clicking it from the taskbar, or by navigating through the menu (Raspberry Pi icon -\> Accessories -\> Terminal). In the terminal, enter:

```terminal
sudo apt install code
```

The output should look something like this. A good way to make sure that something has been installed is to check the line that I circled below.

![](https://cdn-learn.adafruit.com/assets/assets/000/134/078/medium800/raspberry_pi_Screenshot_from_2024-12-10_09-38-09.jpg?1733841840)

Then, open VS Code from **Menu** -\> **Programming** &nbsp;-\> **Visual Studio Code**.

![raspberry_pi_Screenshot_from_2024-12-10_09-38-41.jpg](https://cdn-learn.adafruit.com/assets/assets/000/134/079/medium640/raspberry_pi_Screenshot_from_2024-12-10_09-38-41.jpg?1733841891)

When you open it, it should look something like this, but as long as it opens and you don't get any error messages, you're probably fine.

![](https://cdn-learn.adafruit.com/assets/assets/000/097/226/medium800/raspberry_pi_Screenshot_from_2020-11-24_13-13-31.png?1606242082)

If you'd like to install the CircuitPython extension, click the extensions tab (circled in red below), type CircuitPython into the search bar, and install **CircuitPython v2** by wmerkens.

![](https://cdn-learn.adafruit.com/assets/assets/000/134/080/medium800/raspberry_pi_Screenshot_2024-12-03_144940.jpg?1733841963)

Now you should be ready to use VS Code on your Raspberry Pi. For more information about using VS Code, click on the link labeled "VS Code Documentation" on the sidebar.

# Visual Studio Code for the Raspberry Pi

## VS Code Documentation


## Guide Products

### Raspberry Pi 3 - Model B - ARMv8 with 1G RAM

[Raspberry Pi 3 - Model B - ARMv8 with 1G RAM](https://www.adafruit.com/product/3055)
Did you really think the Raspberry Pi would stop getting better? At this point, we sound like a broken record, extolling on the new Pi’s myriad improvements like we’re surprised that the folks at the Raspberry Pi Foundation are continuously making their flagship board better.&nbsp;...

In Stock
[Buy Now](https://www.adafruit.com/product/3055)
[Related Guides to the Product](https://learn.adafruit.com/products/3055/guides)
### Raspberry Pi 4 Model B - 4 GB RAM

[Raspberry Pi 4 Model B - 4 GB RAM](https://www.adafruit.com/product/4296)
The Raspberry Pi 4 Model B is the newest Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 4 better than the 3? How about a&nbsp;_faster_ processor, USB 3.0 ports, and updated Gigabit Ethernet chip with...

In Stock
[Buy Now](https://www.adafruit.com/product/4296)
[Related Guides to the Product](https://learn.adafruit.com/products/4296/guides)
### Raspberry Pi 4 Model B

[Raspberry Pi 4 Model B](https://www.adafruit.com/product/4297)
The Raspberry Pi 4 Model B is the newest Raspberry Pi computer made, and the Pi Foundation knows you can always make a good thing _better_! And what could make the Pi 4 better than the 3? How about a&nbsp;_faster_ processor, USB 3.0 ports, and updated Gigabit Ethernet chip with...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4297)
[Related Guides to the Product](https://learn.adafruit.com/products/4297/guides)
### Raspberry Pi 400 Desktop - Computer Only

[Raspberry Pi 400 Desktop - Computer Only](https://www.adafruit.com/product/4795)
Raspberry Pi 400 is a complete Raspberry Pi 4-based personal computer, integrated into a keyboard. The Pi 4 is the first computer from the Pi Foundation that really feels 'desktop computer' speed - you can use it as an every day computer at a great price!

Normally you'd need...

In Stock
[Buy Now](https://www.adafruit.com/product/4795)
[Related Guides to the Product](https://learn.adafruit.com/products/4795/guides)
### Raspberry Pi 400 Desktop - Full Computer Kit

[Raspberry Pi 400 Desktop - Full Computer Kit](https://www.adafruit.com/product/4796)
Raspberry Pi 400 is a complete Raspberry Pi 4-based personal computer, integrated into a keyboard. The Pi 4 is the first computer from the Pi Foundation that really feels 'desktop computer' speed - you can use it as an every day computer at a great price!

Normally you'd need...

In Stock
[Buy Now](https://www.adafruit.com/product/4796)
[Related Guides to the Product](https://learn.adafruit.com/products/4796/guides)

## Related Guides

- [Raspberry Pi Care and Troubleshooting](https://learn.adafruit.com/raspberry-pi-care-and-troubleshooting.md)
- [Raspberry Pi Pedal for Youtube](https://learn.adafruit.com/raspberry-pi-pedal-for-youtube.md)
- [CYBERDECK Expansion Plate](https://learn.adafruit.com/cyberdeck-plate.md)
- [Adafruit AMG8833 8x8 Thermal Camera Sensor](https://learn.adafruit.com/adafruit-amg8833-8x8-thermal-camera-sensor.md)
- [Raspberry Pi Low-Light Long-Exposure Photography](https://learn.adafruit.com/raspberry-pi-hq-camera-low-light-long-exposure-photography.md)
- [Raspberry Pi YouTube Boombox](https://learn.adafruit.com/youtube-radio.md)
- [Raspberry Pi Thermal Camera](https://learn.adafruit.com/raspberry-pi-thermal-camera.md)
- [iNTERCEPT + SDR for Signal Monitoring on Raspberry Pi](https://learn.adafruit.com/intercept-and-sdr-for-monitoring-signals-on-raspberry-pi.md)
- [Arcade Bonnet Controller](https://learn.adafruit.com/arcade-bonnet-controller.md)
- [CompuCanvas 101 - Transitions](https://learn.adafruit.com/compucanvas-101.md)
- [diy lofi hip hop raspberry pi radio](https://learn.adafruit.com/lofi-hip-hop-raspberry-pi-radio-braincraft.md)
- [Raspberry Pi Video Synth with Blinka and Processing](https://learn.adafruit.com/raspberry-pi-video-synth-with-blinka-and-processing.md)
- [Raspberry Pi SelfieBlock](https://learn.adafruit.com/selfieblock.md)
- [Running PyPortal Code on Blinka with Displayio](https://learn.adafruit.com/running-pyportal-code-on-blinka-with-displayio.md)
- [Robotic AI Bear using ChatGPT](https://learn.adafruit.com/robotic-ai-bear-using-chatgpt.md)
- [Raspberry Pi HQ Camera Case](https://learn.adafruit.com/raspberry-pi-hq-camera-case.md)
