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
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.