Stuck "Initializing PlatformIO Core..." when switching projects in VSCode

Recently, PlatformIO gets stuck whenever I switch between folders or workspaces (platformio projects) in VSCode. I can close VSCode and upon re-opening, the last project will initialize OK. This happens if I use File → Open Folder, File → Open Workspace from File, or File → Open Recent. I can work around by always closing VSCode and opening the new project, but it was working just fine until about a week ago.

MacOS 14.14.1
VSCode 1.88.1
PlatformIO 3.3.3

I have tried:

  • closing VSCode window and re-open
  • uninstall & reinstall PIO (with & without VSC restarts)
  • uninstall & reinstall C++ (with & without VSC restarts)
  • uninstall & reinstall VSCode
  • reboot computer

None of that works, I must close and re-open VSCode if a pio project has been loaded. Any ideas/help? Is there any initialization log I can review to see where it is hanging up?

I have given up using VS Code Workspaces with multiple projects at the same time.
I always open a new VS Code window for the project I want to work on.
On Windows I right-click on the project folder and select “Open with Code”.
I don’t know if it works the same way on a Mac.

1 Like

I am experiencing the same issue, also on Mac. first Instance opens fine and the second, third simply do not show the build/upload menu.
Clicking on the PlatformIO icon on the left also just shows “Initialising PlatformIO Core”
Also tried uninstall/reinstall of PlatformIO Extention and VS Code, no luck

When you open a fresh new VS Code Window, without having a PIO Project in it, there will be no bottom bar (build, upload, monitor etc.)

This should be only visible for a few seconds.
Does it stay for you?

Reinstalling is not performed by removing the plugin from VS Code.

  • close VS Code
  • delete /Users/<username>/.platformio/penv (or rename the folder to keep a copy)
  • start VS code and wait until PlatformIO has performed all necessary tasks (reinstallation)

The second Project is also a PIO project so it should show on the second instance.

With regard to the “Initialising” yes it just remains there indefinitely and does not load, on the second Instance that is.

I will try your suggestion on removing the files shortly.

Thanks for the help

@sivar2311 thanks so much that resolved my problem. After removing the directory when opening it re-downloaded and installed PIO.

Thanks agains for the quick assistance!!

1 Like

This was the fix for me as well. Thank you, @sivar2311.