Ibrahim Sowunmi

How to Get PlatformIO Running on Windsurf

PlatformIO is a powerful development environment for embedded systems, but getting it to work properly in Windsurf can sometimes be challenging. This guide will walk you through the process of installing and configuring PlatformIO in Windsurf.

Starting from Scratch

If you’re experiencing issues with PlatformIO in Windsurf, it’s often best to start fresh:

  1. Uninstall all extensions related to PlatformIO and C/C++ development
  2. Download the .vsix file for Microsoft’s C/C++ tools extension:
  3. Download the .vsix file for PlatformIO:
  4. Install both extensions in Windsurf:
    • Press Cmd + Shift + P to open the command palette
    • Type “Extensions: Install from VSIX…” and select this option
    • Navigate to and select the downloaded .vsix files

At this point, the extensions should be working properly in Windsurf.

Alternative Fix

If the above method doesn’t resolve your issues, try the following approach:

  1. Navigate to the PlatformIO extension directory:

    %USERPROFILE%\.windsurf\extensions\platformio.platformio-ide-[version]\
    

    (Replace [version] with the actual version number installed)

  2. Open the package.json file and remove this section:

    "extensionDependencies": [
        "ms-vscode.cpptools"
    ],
    
  3. In the same folder, open the .vsixmanifest file and remove this line:

    <Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="ms-vscode.cpptools" />
    
  4. Save the changes and restart Windsurf.

Conclusion

By following these steps, you should be able to get PlatformIO running smoothly in Windsurf. This approach resolves the dependency conflicts that sometimes occur between PlatformIO and the C/C++ tools extension.

Happy embedded programming!