PlatformIO IDE 3.0 Preview for VSCode - We want your feedback! 🙏

We are happy to announce the pre-release of PlatformIO IDE 3.0 for Microsoft Visual Studio Code (VSCode).

There are many updates in this version that we hope you’ll like, some of the key highlights include:

  • Onboarding with “Walkthroughs”
  • IntelliSense for platformio.ini configuration file
  • Native integration of PlatformIO Unit Testing with VSCode Testing UI
  • New port switcher to override upload, monitor, or testing port
  • Custom buttons and commands in PlatformIO Toolbar.

Please visit PlatformIO IDE for VSCode Release Notes for more detailed information.

Onboarding with “Walkthroughs”

When you install PlatformIO IDE 3.0 first time, the Walkthroughs will be opened. They provide a consistent experience for onboarding you to the PlatformIO ecosystem and features of the PlatformIO IDE extension via a multi-step checklist.

If you already installed PlatformIO IDE for VSCode, you can always open Walkthroughs via Menu: Help > Get Started > Walkthroughs > More...

Demo

Project Management

IntelliSense for platformio.ini

PlatformIO IDE 3.0 for VSCode finally brings powerful IntelliSense support for platformio.ini configuration file with the following features:

  • Auto-completion for configuration options
  • Auto-completion for choice-based option values
  • Hover over the option and get a quick documentation
  • Realtime serial port auto-completion for port-related options
  • Quickly jump to the development platform or library located in the PlatformIO Registry.

Demo

platformio-ini-intellisense-demo

Unit Testing UI

PlatformIO Unit Testing allows you to segregate each part of the firmware/program and test that the individual parts are working correctly. The new PlatformIO IDE 3.0 comes with native integration of PlatformIO Unit Testing solution and VSCode Testing UI.

Once you add tests to your project, a test beaker icon will be displayed on the VS Code Activity bar. The beaker icon is for the Test Explorer view. When opening the Test Explorer, you will see a list of test suites where you can manage project tests:

  • Filter test suites
  • Run selected test suites
  • Jump to the failed test case.

Demo

A demo of calculator example based on the Unity Testing Framework:

Port Switcher

Project Port Switcher was the most requested feature by our community. It is possible now to override “upload”, “monitor”, or “test” ports without any changes to the platformio.ini configuration file. You can also pass your custom value to the port such as IP address for OTA, media disk, or leverage wildcard patterns.

The overridden port using the new switcher has higher priority over the ports configured in the platformio.ini configuration file.

Demo

Custom PlatformIO Toolbar

PlatformIO IDE 3.0 for VSCode allows you now to configure your own toolbar using a new platformio-ide.toolbar configuration option. You can declare your own buttons and attach commands to them. There is no limitation to command scope. You can use Built-in VSCode Commands or commands from your 3rd party favorite extensions.

The button can be text, an icon, or a mix of them. The list of supported icons is documented in VSCode Icon Listing.

You can have different toolbars per workspace thanks to the User and Workspace Settings.

Demo

Below is the overridden toolbar with custom buttons.

And custom configuration specified in VSCode’s settings.json file.

{
  "platformio-ide.toolbar": [
    {
      "text": "Clean All",
      "commands": [
        {
          "id": "workbench.action.tasks.runTask",
          "args": "PlatformIO: Clean All"
        }
      ]
    },
    {
      "text": "$(list-selection)",
      "commands": [
        {
          "id": "platformio-ide.runPIOCoreCommand",
          "args": "pio device list"
        }
      ]
    },
    {
      "text": "$(plug)",
      "commands": [
        {
          "id": "platformio-ide.runPIOCoreCommand",
          "args": "pio device monitor --filter time"
        }
      ]
    },
    {
      "text": "$(terminal)",
      "commands": [
        {
          "id": "workbench.action.terminal.sendSequence",
          "args": {
            "text": "echo 1\n"
          }
        }
      ]
    }
  ]
}

Upgrade

Please navigate to the Extension view in VSCode, install the PlatformIO IDE extension, open it, and click on “Switch to Pre-Release Version”. Restart VSCode.

You can always back to the stable release by visiting the same extension page and clicking on “Switch to Release Version”.

Stay in touch with us

Please follow us on LinkedIn and Twitter @PlatformIO_Org to keep up to date with the latest news, articles, and tips!

Regards,
Your friends at PlatformIO.

5 Likes

@ivankravets Nice new features! THX.

Like the Custom PlatformIO Toolbar alot, tested works like a charm.
Is it possible to add a hover text like it is with the hardcoded entrys?

1 Like

In the release notes: “Added PlatformIO base commands to the Explorer context menu”

I really think you should undo this. As the name implies, a context menu is for commands specifically related to the thing you’ve right-clicked. Of the four commands you add to the Explorer context menu, three are global and redundant (PIO home, PIO core upgrade, and PIO open CLI); only the Rebuild IntelliSense Index command is potentially specific to the selected project (though it’s unclear to me whether it actually is context-aware).

All of those commands already have a home, so I think it’s a really bad idea to clutter up the Explorer menu, whose commands are very much file-management specific, with redundant, unrelated commands.

1 Like

Hi Antonio!
Thanks for the feedback. Agree with you. Fixed in

Have you declared the tooltip field? See

Thx, thats working fine!!!

1 Like

Yes, the example works fine. And so I came up with the idea of ​​building a reset button for the ESP32. So far I have pressed CTRL t + CTRL d twice in the terminal.
My code is:

        {
            "text": "$(search-refresh)",
            "tooltip": "ESP32 Reset",
            "commands": [
                {
                    "id": "workbench.action.terminal.sendSequence",
                    "args":  {
                        "key":[
                            "ctrl+t",
                            "ctrl+d",
                            "ctrl+t",
                            "ctrl+d",
                        ]
                    },
                }
            ]
        }

but that doesn’t seem to be the right approach. Is that even possible?

This is the terminal’s command, not “serial monitor”. The only option that comes to my mind is to create custom target and reset the board using PySerial API. Later, the custom task will be available in “Run task…”.