The Arduino IDE has been the first coding experience for many people. While it gets the job done, it is missing key features that most modern code editors have.
Visual Studio Code (VS Code) has quickly become one of the most popular code editors but doesn’t support Arduino development as standard.
Enter PlatformIO, an open source tool for programming Arduino boards (and much more)! Learn how to get PlatformIO and use it to create a simple Arduino sketch in VS Code.
Read this in article form at https://www.makeuseof.com/tag/better-arduino-coding-vs-code-platformio/