I’m quite new at using the PlatformIO IDE and VS Code.
I am currently dealing with several projects designed for ESP-32. For convenience, I would like to have them in the same VS Code Window / Workspace. I added the root folder of both to the workspace as usual.
When I am switching between files of the two projects, PIO detects the correct environment related to the file I’m editing. It is updated in the “Project Task” pane and when I click on “Build” from this pane, the build command is launched in the correct folder and environment.
But when I launch the “PlatformIO: Build” task with shortcut or from the command palette, on whatever file the focus is, the same project is built. The only way to build the second one is to open the sidebar and manually click on “Build”.
I tried with a new workspace and 2 blank projects and I got the same behavior.
I feel very frustrated not to be able to use shortcuts.
Is it supposed to work like this?
Is it due to a configuration mistake from me?
Is there any way to get the desired behavior?
Is it due to limitations in the interactions between VS Code and PIO?
Thanks for answering to any of these questions!