One thing to keep in mind is if you dn’t have a PlatformIO project folder open in your workspace the toolbar won’t show… it only shows up if the extension detects a PlatformIO project. However, the alien head icon for platformio should always show up in the activity bar on the left.
I started using PlatformIO very recently and everything was great till yesterday when I tried to link libraries into a project using ln -s. Well, the sym link did not work so I removed them and tried to copy the files. I noticed that the PIO tools vanished. I have tried removing PIO and reinstalls but cannot get the tools back. For some reason the commands ‘command ‘platformio-ide.build’ not found’ also do not work. A little inconsistent. Help.
If so, perhaps something is wrong with the project configuration/layout and it’s no longer recognised as a PIO project. Is the platformio.ini still in the root of the project folder?
That pretty much means there is something wrong with the project layout and PIO doesn’t recognise it.
If there isn’t a platformio.ini still in the root of the project folder, you’ll need to re-create it. You could either create a new project, and move the source files into it, or create the platformio.ini yourself, and put the correct board / platform / framework values in.
You may also find some clashes with the Arduino extension, so it’s also best to disable that when you don’t need it.
e.g. for the Arduino Uno, a skeleton platformio.ini would look like:
[env:uno]
platform = atmelavr
board = uno
framework = arduino
Thank you. I do have the platform.ini and and verified that every time. I created a new project to test, just in case the problem was with my project. It did not work.
I also disabled Arduino to try that. That had not worked too. Incidentally, the first time when I installed PIO it worked great with Arduino toolbar too.
I can’t fathom that just adding and removing libs can cause PIO UI to fail. I will be trying this one more time as I want to debug and step through an application I m working on.
Has anyone found a fix for this? I definitely have the platformio.ini file, the extension works (have done uploads) and no alien. I uninstalled the extensions, reloaded vscode, installed it again, reloaded vscode, and it hasn’t appeared. Pleas help.
These are repeated frequently in the js console. Is there some other pane in the inspector you want to see?
rejected promise not handled within 1 second:
Error: command 'platformio-ide.build' already exists
workbench.desktop.main.js:71 [Extension Host] stack trace:
Error: command 'platformio-ide.build' already exists
at o.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:60904)
at Object.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:30995)
at I.registerTaskBasedCommands (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:10042)
at I.refresh (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:7566)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5
workbench.desktop.main.js:2693 [[object Object]]
command 'platformio-ide.build' already exists
$onExtensionRuntimeError @ workbench.desktop.main.js:2693
workbench.desktop.main.js:2693
Error: command 'platformio-ide.build' already exists
at o.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:83:60904)
at Object.registerCommand (c:\Users\mark\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:97:30995)
at I.registerTaskBasedCommands (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:10042)
at I.refresh (c:\Users\mark\.vscode\extensions\platformio.platformio-ide-2.4.3\dist\extension.js:1:7566)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
$onExtensionRuntimeError @ workbench.desktop.main.js:2693
workbench.desktop.main.js:71 [Extension Host] runCommand C:\Users\mark\.platformio\penv\Scripts\python.exe Array(2) Object
And in VSCode, you only have one project folder in the workspace? Not sure how Error: command 'platformio-ide.build' already exists could have gotten there, maybe @ivankravets knows more…
FYI: I just did a fresh install of windows 10, wsl, ubuntu, vscode, and platformio. I cloned my project folder. This problem still has the exact same symptoms.
EDIT: I cloned an old project that worked well before and it didn’t have the alien either. The old project couldn’t build which is not a problem with my current one. The vscode window had the build icon on the bottom but when I click it I get the error command 'platformio-ide.build' not found. Oh well.
I’d be happy to zip up my project folder if anyone wants to try it.