I am getting this error while trying to build in platformio. The terminal process failed to launch: Path to shell executable "c:\Users\aditi.DESKTOP-49PGKM5\Documents\Test1\platformio.exe" does not exist. Test1 is my cpp file. The path in quotation marks("") is not where the platformio.exe file is, but it is where the Test1 file. But when I run the command c:\Users\aditi.DESKTOP-49PGKM5\Documents\Test1\platformio.exe run in powershell it works. How do I change the path that platformio is using to find the platformio.exe file?
I have tried reinstalling vscode, platformio, deleting the .platformio folder, adding the custom path in the Json settings file "platformio-ide.customPATH": "C:\Users\aditi.DESKTOP-49PGKM5\.platformio\penv\Scripts\platformio.exe" like this but no luck.
I have found several approaches on the internet because I was facing kind of the same behavior.
However, in the end it was just adding the folder with platformio.exe to path (expecting you are using Windows). Search for environment variables
in your Windows search bar and add C:\Users\<YOU>\.platformio\penv\Scripts
(or wherever the platformio.exe is on your system) to path.
Then restart VSCode and it should end up working.
Credits for that: https://community.platformio.org/t/build-fails-after-most-recent-updates/16351/8