There’s no point in increasing the memory load for VS Code Remote with a desktop that isn’t needed. I always use Lite for headless development as it saves SD card space and memory usage, and boots up quicker. Instructions are here in the VS Code Remote SSH docs if you are interested. I re-flashed an SD card with Raspberry Pi OS Lite for headless development, powered it up and connected from VS Code. The limited memory on Raspberry Pi means that I wasn’t expecting VS Code to run on the desktop OS, but having the Raspberry Pi 3 chip means the architecture is supported for the Remote SSH extension, allowing me to remotely connect from my Mac to edit, debug and run code. I like to use Raspberry Pi Zero in setups such as lighting, where you can’t easily connect a monitor when you want to dive in and debug code when it (inevitably) goes wrong. VS Code ideally needs 1GB to run locally, and more depending on the language server being used. This really isn’t surprising, mainly due to Zero 2’s 512MB RAM. It’s fine for occasional use, but Raspberry Pi Zero 2 is just not really powerful enough. I also tried to install the Python extension, and it just hung. You could visibly see screen redraws sometimes, with menus taking a few seconds to appear. It installs and runs, but the performance is far from ideal. Installation instructions are here in the VS Code docs if you are interested. My first test was to install the full desktop version of Raspberry Pi OS and see how well VS Code runs as a desktop app. So obviously I ordered one as soon as I could to test out VS Code. This provides a few interesting upgrades over Raspberry Pi Zero, including the use of the same processor that is in Raspberry Pi 3 - a device that has an architecture supported by VS Code. Recently Raspberry Pi Zero 2 was announced. The architecture wasn’t supported, and there was no interest to support it as the boards were just not powerful enough. It’s the tiny devices, Raspberry Pi Zero, that in the past haven’t been able to run VS Code with either of these two techniques. With the more powerful devices, like Raspberry Pi 400 or Raspberry Pi 4, both of these are viable options. There are two ways that I use to run VS Code on Raspberry Pi - either installed directly running under the Raspberry Pi desktop, or connecting via the Remote SSH extension to develop remotely on Raspberry Pi from your PC or Mac.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |