Building and Running VSCode on a RaspberryPi 3

Your mileage may vary

As part of a DIY robotics project I am tinkering with, I recently discovered that it is possible to run Visual Studio Code on a Raspberry Pi 3.  There were a couple of posts about how to write code using .Net Core that can control GPIO pins.  Which is the sort of thing I will need to work with a motor controller.  One approach for that is to use a Windows 10 computer to write and deploy code with VS Code to the Raspberry Pi over Putty or by some other means.  After hearing that VS Code can actually be built on the Raspberry Pi, my thought was, ok, well, why not write the code directly on the device?

This turned out to be more difficult than I had hoped.  My mileage did vary from a few existing how-to posts on the internet.  This post hopes to provide a little more detail.


Thanks to Gunjan Datta for the excellent post in December of 2016 on how to do this (here).

Thanks to Scott Hanselman for the inspirational post in March of 2016 on how to do this (here).

There is also a neat little gist with some useful resources (here).


First up, hardware and software versions.  There are countless articles about how to provide keyboard, mouse, an HDMI monitor, and power to the Raspberry Pi and most of this post assumes a basic understanding of how to get started with the Raspberry Pi 3.  But if you want a resource for getting started, that is located (here).

I used a Raspberry Pi Model 3 B. Which has a Quad Core 1.2GHz CPU, 1GB RAM, 40 GPIO Pins, 4x USB Ports, 4 Pole Stereo Output, HDMI Port, Ethernet, WiFi, Bluetooth Low Energy (BLE), and a Micro SD Card Slot.

Using the NOOBS operating system preinstalled on a 16GB MicroSD card, I chose to install the Raspbian OS and I specified English (US) as the language and US as the keyboard layout.  The installation wizard is available on first boot up by holding down your shift key.