Always asking for project directory

When I did a fresh start of VSCODE (macOS) last time (minutes before) I was told I had not chosen a project directory. I was offered one where I detected my recent project. I opened that. But all my othere projects are gone and starting over VSCODE, PIO gives me the same view of that recent project only, seemingly with all other projects forgotten.

How can I reset this view and get back my projects?

This usually happens if you still have VS Code open and start another instance of VS Code.

You can reopen previous projects / workspaces in VS Code by clicking on “File / Open Recent…”.

This is where VS Code is a bit confusing (for me).

I’ve gotten out of the habit of using workspaces.

Here’s how I do it:
I create a folder for each project. When I want to open the project, I right-click on the folder and select “Open with VS Code”. This works perfectly under Windows. I don’t know if this functionality exists on a Mac.

This also has the advantage that only a single project is open in VS Code and PlatformIO always processes the correct project.

Maybe one or the other VS Code expert here knows a better way.

You’re lucky to have found a way. I keep hairpulling on VSCODE and the PIO plugin.
And I’m not creating a new project. I’m importing an arduino one.

How do I get into the mode to build and upload the project?

I understand there is the Explorer view. I see my project and its source files.
my recently imported Arduiono preject is names
240228-170332-DENKY32 and I can open the src directory for instance.

When I click on the platformio icon in the activity bar on le left, the PLATFORMIO tree view opens. I see PROJECT TASKS and see denky32 ( as the only project). Is this my current project?

I can build it. OK. I can upload it. I’m getting this errors saying the Terminal is being reused by other tasks. Please press any key.

When I press any key, the upload process starts again and that Terminal being used message comes again. Weird.

When you import an Arduino project, a new PlatformIO project is created in a new folder. This folder contains the appropriate folder structure (subfolders include, lib, src, test and the configuration file platformio.ini).

You can select the current project, or more precisely the current project environment, by clicking in the bottom status bar:

The functions for build (1), upload (2) and open the serial monitor (3) can also be found in the bottom status bar:

You misunderstand that. This is not an error message.

After finishing the build task, the console is not closed automatically. Otherwise you would never be able to see the output (error message or success message) of the build process.

As described there, you can close the window by pressing any key. However, you must also set the input focus to the terminal window. First click with the mouse in the terminal window and then press any key.
Otherwise, the keystrokes will go into the active window - which is most likely the editor window.

You can also simply close tasks by clicking on the trash can symbol (right-hand side):