With Visual Studio Code now support Raspberry Pi officially, just tried to install on Raspberry Pi 4B/4GB. As straightforward as stated in Visual Studio Code doc.
Install official Visual Studio Code (ver 1.5) and PlatformIO IDE on Raspberry Pi OS (32 bit):
Install VS Code:
Scroll down and download ".deb" of "ARM" build for 32 bit Raspberry Pi OS.
Open Terminal, run the command:
$ sudo apt install ./<file>.deb
Where <file> is the file downloaded.
Install Extension of PlatformIO IDE to Visual Studio Code:
Click Extension tab, search and install PlatformIO IDE