Skip to content

2. Visual Studio Code on the Pi

Brian Mikinski edited this page Sep 28, 2018 · 2 revisions

Visual Studio Code is a wonderful open source IDE maintained by Microsoft. Out of the box you can run VS Code on Windows, OSX and most linux distros. Unfortunately Microsoft doesn't have an official build for arm based systems like the Raspberry PI but the wonderful devs at https://code.headmelted.com/#linux-install-scripts are hosting builds they've made for single-board computers like the Pi. VS Code isn't quite as performant on the lower powered devices but none-the-less work great as a IDE for making minor edits.

Install Visual Studio Code OSS on Raspberry Pi devices

pi@raspberrypi:~ $ sudo . <( wget -O - https://code.headmelted.com/installers/apt.sh )

Word of Caution

I have noticed that when building or running .Net Core application from the VS Code integrated terminal can sometimes cause your PI to become unresponsive. Building and running .Net Core applications from a native terminal window outside of VS Code seems to work much better.

Running VS Code OSS as a root user

Sometimes you might find that you prefer using code to update system files as opposed to classic command line editors such as VI or nano. In that case you will likely need to run VS Code as a super user. If you need to do that, you can use the following command to start VS Code from the command line and edit any system file you see necessary.

pi@raspberrypi:~ $ sudo code-oss --user-data-dir="~/.vscode-root"