PlatformIO IDE for VSCode

PlatformIO IDE is the next-generation integrated development environment for IoT.

  • Cross-platform build system without external dependencies to the OS software:

    • 400+ embedded boards
    • 20+ development platforms
    • 10+ frameworks
  • PIO Unified Debugger

  • PIO Remote

  • PIO Unit Testing

  • C/C++ Intelligent Code Completion

  • C/C++ Smart Code Linter for rapid professional development

  • Library Manager for the hundreds popular libraries

  • Multi-projects workflow with multiple panes

  • Themes support with dark and light colors

  • Serial Port Monitor

  • Built-in Terminal with PlatformIO Core and CLI tool (pio, platformio)

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Python, PHP, Go) and runtimes (such as .NET and Unity)




Please note that you do not need to install PlatformIO Core separately if you are going to use PlatformIO IDE for VSCode. PlatformIO Core is built into PlatformIO IDE and you will be able to use it within PlatformIO IDE Terminal.

  1. Download and install official Microsoft Visual Studio Code. PlatformIO IDE is built on top of it
  2. Open VSCode Package Manager
  3. Search for official platformio-ide extension
  4. Install PlatformIO IDE.

Quick Start

This tutorial introduces you to the basics of PlatformIO IDE workflow and shows you a creation process of a simple “Blink” example. After finishing you will have a general understanding of how to work with projects in the IDE.

Setting Up the Project

  1. Click on “PlatformIO Home” button on the bottom PlatformIO Toolbar
  1. Click on “New Project”, select a board and create new PlatformIO Project
  1. Open main.cpp file form src folder and replace its contents with the next:


The code below works only in pair with Arduino-based boards. Please follow to PlatformIO Project Examples repository for other pre-configured projects.

 * Blink
 * Turns on an LED on for one second,
 * then off for one second, repeatedly.
#include "Arduino.h"

// Set LED_BUILTIN if it is not defined by Arduino framework
// #define LED_BUILTIN 13

void setup()
  // initialize LED digital pin as an output.

void loop()
  // turn the LED on (HIGH is the voltage level)
  digitalWrite(LED_BUILTIN, HIGH);

  // wait for a second

  // turn the LED off by making the voltage LOW
  digitalWrite(LED_BUILTIN, LOW);

   // wait for a second
  1. Build your project with ctrl+alt+b hotkey (see all Key Bindings in “User Guide” section below) or using “Build” button on the PlatformIO Toolbar

Learn more about PlatformIO Toolbar and other commands (Upload, Clean, Serial Monitor) below.

Happy coding with PlatformIO!

PlatformIO Toolbar

PlatformIO IDE Toolbar is located in VSCode Status Bar (left corner) and contains quick access buttons for the popular commands. Each button contains hint (delay mouse on it).

  1. PlatformIO Home
  2. PlatformIO: Build
  3. PlatformIO: Upload
  4. PIO Remote
  5. PlatformIO: Clean
  6. PIO Unit Testing
  7. Run a task… (See “Task Runner” below)
  8. Serial Port Monitor
  9. PIO Terminal

Key Bindings

  • ctrl+alt+b / cmd-shift-b / ctrl-shift-b Build Project
  • cmd-shift-d / ctrl-shift-d Debug project
  • ctrl+alt+u Upload Firmware
  • ctrl+alt+s Open Serial Port Monitor

Task Runner

PlatformIO IDE provides base tasks Menu > Tasks (Build, Upload, Clean, Monitor, etc) and custom tasks per Project Configuration File platformio.ini environment ([env:***]). A default behavior is to use Terminal Panel for presentation. Also, we use dedicated panel per unique task.

PlatformIO IDE provides own Problems Matcher named $platformio. You can use it later if decide to change base task settings.

You can override existing task with own presentation options. For example, let configure PlatformIO Task Runner to use NEW Terminal panel per each “Build” command:

  1. Please click on “gear” icon near “Build” task in Menu > Tasks
  2. Replace template in tasks.json with this code
    "version": "2.0.0",
    "tasks": [
            "type": "PlatformIO",
            "task": "Monitor",
            "problemMatcher": [
            "presentation": {
                "panel": "new"

See more options in official VSCode documentation.

Custom Tasks

Custom tasks can be added to tasks.json file located in .vscode folder in the root of project. Please read official documentation Tasks in VSCode.

This simple example demonstrates a custom build process in verbose mode. There are a lot of other commands, please read more about PlatformIO Core and its commands (User Guide).

    "version": "2.0.0",
    "tasks": [
            "type": "shell",
            "command": "platformio",
            "args": [
            "problemMatcher": [
            "label": "PlatformIO: Verbose Build"

Serial Port Monitor

You can customize Serial Port Monitor using Monitor options in Project Configuration File platformio.ini:


platform = espressif32
framework = arduino
board = esp32dev

; Custom Serial Monitor port
monitor_port = /dev/ttyUSB1

; Custom Serial Monitor speed (baud rate)
monitor_speed = 115200

Install Shell Commands

Please navigate to PIO Core Install Shell Commands.


How to configure VSCode settings?


Use built-in PlatformIO Core, default value is true.


Use development version of PlatformIO Core, default value is false.


Automatically rebuild C/C++ Project Index when Project Configuration File platformio.ini is changed or when new libraries are installed, default value is true.


Force “Upload and Monitor” task for Upload (platformio-ide.upload) command, default value is false.


Custom PATH for platformio command. Paste here the result of echo $PATH (Unix) / echo %PATH% (Windows) command by typing into your system terminal if you prefer to use custom version of PlatformIO Core, default value is null.


Update Terminal configuration with patched PATH environment, default value is true.


Activate extension only when PlatformIO-based project (with Project Configuration File platformio.ini) is opened in workspace, default value is false.


Default action for “Build” button on PlatformIO Toolbar, default value is release. Possible values are release or pre-debug.

To eliminate a full project rebuilding before debugging, please change this value to pre-debug.


Automatically close platformio device monitor before uploading/testing, default value is true.

Known issues

PackageManager is unable to install tool

This is a known bug in VSCode Terminal issue #61.

A temporary solution is to install packages using a system terminal (not VSCode Terminal). Please use “Solution 3: Run from Terminal” in FAQ > Package Manager > [Error 5] Access is denied.

Now, back to VSCode.


Please visit releases page.