

When you are debugging, the debug session runs on the remote device, but VS Code runs on the host machine.įor example – I can run VS Code on my MacBook Pro, and connect remotely to a Raspberry Pi 4 that is running headless.

You see the remote file system, the VS Code terminal runs on the remote device, and you access the remote device’s hardware. This extension allows you to connect to a remote device over SSH, and run VS Code as if you were running on that remote device. One of the extensions that helps here is the Remote SSH extension, part of a pack of remote development extensions. You can run VS Code on Windows, macOS, and of course on a Raspberry Pi. I practically live day to day in VS Code: whether I’m writing blog posts, documentation or Python code, or programming microcontrollers, it’s my work ‘home’. There is a better way – using Visual Studio Code remote development! Visual Studio Code, or VS Code, is a free, open source, developer’s text editor with a whole swathe of extensions to support you coding in multiple languages, and provide tools to support your development. The downside is programming and debugging it – do you plug your Raspberry Pi into a monitor and run the full Raspberry Pi OS desktop, or do you use Raspberry Pi OS Lite and try to program and debug over SSH using the command line? Or is there a better way? Remote development with VS Code to the rescue The upside of headless is that my Raspberry Pi can be anywhere, not tied to a monitor, keyboard and mouse. Like a lot of Raspberry Pi users, I like to run my Raspberry Pi as a ‘headless’ device to control various electronics – such as a busy light to let my family know I’m in meetings, or my IoT powered ugly sweater.
#Django development on visual studio code workspace how to
Jim Bennett from Microsoft, who showed you all how to get Visual Studio Code up and running on Raspberry Pi last week, is back to explain how to use VS Code for remote development on a headless Raspberry Pi.
