Building on a Raspbery Pi
As someone who develops for small devices including the Pi, believe me that building on the device itself is a last resort. It might make sense to do for a school computer lab decked out with Pi keyboards or whatever. But usually it's better to have a PC with a cross compiler and VS Code or something like it with rsh to do your development on - it's way faster, the editor is faster, your files are on the PC and you can still do stuff like debugging.
As an aside one of the cool things added to VS Code recently is the ability to run VS Code from Windows and build / debug stuff within the Windows Linux subsystem. It's actually really easy to develop Linux code from Windows now.