Hello.
When building a PlatformIO project, I get the error The terminal process failed to launch: Path to shell executable "c:\[path to my project]\platformio.exe" does not exist.
I followed most of the instructions found at this link, but I was unable to fix this issue. The one tip I have not done yet was adding Arduino.h to the includePath in c_cpp_properties.json. However, I am not sure how to locate where Arduino.h is at on my computer.
Does anyone know where I can locate Arduino.h? Or are there any other tips for fixing this issue?
Thanks.
Hello.
I was wondering if anyone knew what steps I should take to fix this error. I tried searching online, but it seems like a solution to this problem has not yet been found.
Yes, I took a look at that link. The suggestions given in it were also given in the link in my previous post.
There is a difference:
“Remove the folder C:\Users\<user>\.platformio\packages\framework-arduino-avr
” vs. “Delete your entire C:\Users\<user>\.platformio
”
Did you deleted the entire folder “C:\Users\<user>\.platformio
” ?
Ah, you are right. However, after following the instructions in that link, I still got the same error when rebuilding my project for some reason.
I also removed the .vscode folder, opened the command palette, and selected PlatformIO: Rebuild IntelliSense Index. However, this also did not work.
The .vscode folder is only related to the local project. But the problem is global and relates to your entire PlatformIO installation. A complete reinstallation of VS-Code is triggered by deleting the C:\users\<username>\.platformio
folder. VS-Code must of course be closed beforehand.
Usually the system does not search for the platformio.exe within the project folder - this makes no sense.
- Remove the PlatformIO plugin from VS-Code
- Exit VS-Code
- Delete the .platformio folder (see above)
- Restart VS-Code
- Install the PlatformIO plugin for VS-Code again
Got it.
I followed these steps, but after removing the plugin, deleting .platformio, restarting VS-Code, and installing the plugin again, the system still searches for platformio.exe in my project folder.
Where should it be searching for platformio.exe?
platformio.exe
and pio.exe
are located in
C:\Users\<user>\.platformio\penv\Scripts\
When PlatformIO is uninstalled (after the step “deleting the .platformio folder”), please check your vscode settings for any PlatformIO related settings and remove them.
- open
C:\Users\<user>\AppData\Roaming\Code\User\settings.json
- search for “platformio”
- remove found entries
- continiue reinstalling PlatformIO
Please also check your environment variables and remove all PlatformIO related variables (if exists)
Hm. I searched for “platformio” inside C:\Users<user>\AppData\Roaming\Code\User\settings.json, but I was unable to find anything.
Also, I checked my environment variables and did not find PlatformIO in there either.
In VS-Code click the Gear-Icon (bottom left corner) and click “Settings”
Search settings for “PlatformIO”.
Click on “Edit in settings.json” (if available).
I tried searching for PlatformIO in Settings, but the two settings that showed up were unrelated to PlatformIO.
I did not see an option called “Edit in settings.json”.
Then there will probably be no further settings that can be edited.
That’s why I wrote “if available”
If PlatformIO is completely removed and there are no other settings for PlatformIO in VS Code, where does this error come from? There must still be something PlatformIO related somewhere on your system where these settings (path) are coming from.
Today after updating Platformio and VScode, I have the same problem, I tried to delete platformio folder but its not helping… Why is this happening with every other platformio or vscode update?
I tried to add "platformio-ide.customPATH": "C:/Users/Borko/.platformio/penv/Scripts"
in settings json and after that, platformio preformed reinstall. After all I’m getting the same error message.
Don’t touch the customPath!
Simply add C:\Users\Borko\.platformio\penv\Scripts
to your PATH (Windows Environment Variable)
2 Likes
Oh, thanks a lot it works now!
While adding the PlatformIO venv path to PATH, it’s not really a clean solution to the issue, especially when working often with Python.