So I bought a Raspberry PI 5 and VS Code crashes!

Crash on VS Code running on a Reaspberry Pi 5.

And the first thing I did after assembling it, was install VS Code and Rust.  And irritatingly, there’s some kind of a bug with the current version of VS Code. 1.97.

Open a project- say for a Rust application and view the source code. After a few seconds or so it crashes with a The window terminated unexpectedly (reason: ‘crashed’, code 5).

I also updated my Raspberry Pi 4B, installed Rust and got the same crash with it.

Thankfully Raspis come with grim which lets you do screenshots on Wayland.

Want to know if your system is running Wayland? From a terminal run this command:

echo “$XDG_SESSION_TYPE”

And you’ll either get wayland or x11.

So I hope the VS Code issue gets fixed soon.

(Visited 809 times, 1 visits today)

6 thoughts on “So I bought a Raspberry PI 5 and VS Code crashes!

  1. Same here, on both Pi5 8Gb and Pi4 4Gb,each running current version of Raspberry Pi OS. Was fine until the February update of VS Code.

    Hopefully will be fixed for the March update.

  2. Omg mw too, please help me i already disable gpu, blablabla, until reinstall vs code and is still crasched

  3. Yeah same here, VSCode started crashing on Raspberry Pi5, noticed it today (13th March 2025) no idea why, same error message.

  4. Add “kernel=kernel8.img” to config.txt in /boot/firmware (without the quotes). it fixes the crashes, by USING THE RPI4 KERNEL. i think the bug’s caused by something in the new kernel.

    1. The fix I posted has certainly worked on both VS Codes running on hyper-v Ubuntu and on a Raspberry Pi 5 running Raspberry PI OS. Without it, VS Code crashes within a few seconds of opening a file.

Comments are closed.