Speed up Visual Studio Code Remote Development
/I’m writing all the code for the red telephone project in JavaScript as a node application. This is because it makes it very easy to host a website on the phone. Also I need a lot of multi-threading and events stuff and JavaScript’s await and async stuff makes this so easy to write. Also, I like writing JavaScript.
I’m writing the code on the Raspberry Pi W that is powering the phone. This is a really useful thing to be able to do. I can set breakpoints which are triggered when hardware events occur. Then I can step through the code. I’m using Visual Studio Code, but the environment is running on my PC and I’m using the amazing Remote Development feature to develop on the Pi. But it is not without its problems. When I started doing this, things would work fine for a while and then suddenly the Raspberry Pi would lock up and progress would grind to a halt.
I did some searching and thanks to this wonderful post I discovered how to fix it. It turns out that some of the language plugins for Visual Studio Code consume humungous amounts of computer power. And when they wake up on the Raspberry Pi it is pretty much game over for development on the machine. If you search the extensions for “@builtin type” and then disable the two shown above you’ll find that things work swimmingly. You miss out on a few useful goodies, and you’ll have to re-enable these to get them back, but in the meantime at least you’ll be able to do useful work on a device costing less than a couple of burgers and fries.