Yesterday I had to reinstall VS Code/Pio IDE/Pio Core (system 1.127.0/3.3.4/6.1.19) on Windows 11. On opening an existing test project Platformio initialises then builds, uploads and monitors an ESP8266 running a very basic main.cpp under a minimal platformio.ini. However #include <Arduino.h> is squiggled, and errors are not at least not until I build.
I have only a single platformio.platformio-ide in extensions folder – -3.3.4-win32-x64. PlatformIO IDE:customPATH is empty. Platformio-ide: Use Builtin PIO Core and Platformio-ide: Use Builtin Python are checked.
C/S/P Platformio:Rebuild Intellisense Index and C/C++:Reset Intellisense Database produce a message in OUTPUT —
Error: Invalid value for ‘–ide’: ‘vscode’ is not one of ‘clion’, ‘codeblocks’, ‘eclipse’, ‘emacs’, ‘netbeans’, ‘qtcreator’, ‘sublimetext’, ‘vim’, ‘visualstudio’.
and I find this in the developer console —
…
at c:\Users\graha.vscode\extensions\platformio.platformio-ide-3.3.4-win32-x64\node_modules\platformio-node-helpers\dist\index.js:1:5250
at ChildProcess.i (c:\Users\graha.vscode\extensions\platformio.platformio-ide-3.3.4-win32-x64\node_modules\platformio-node-helpers\dist\index.js:1:4548)
at ChildProcess.emit (node:events:509:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1124:16)
at ChildProcess._handle.onexit (node:internal/child_process:306:5)
AFAIK there should be no need for vscodeide.
.vscode is missing from the project tree.
I guess there is a problem with the integration of Intellisense.
I am now stuck for ideas. I am probably just missing a single setting, I hope I am. I have never had any problem reinstalling before.
PS C:!development!!platformio!TESTS\ESP8266\test> pio system info
PlatformIO Core 6.1.19
Python 3.11.7-final.0
System Type windows_amd64
Platform Windows-10
File System Encoding utf-8
Locale Encoding cp1252
PlatformIO Core Directory C:\Users\graha.platformio
PlatformIO Core Executable C:\Users\graha.platformio\penv\Scripts\platformio.exe
Python Executable C:\Users\graha.platformio\penv\Scripts\python.exe
Global Libraries 0
Development Platforms 1
Tools & Toolchains 10
PS C:!development!!platformio!TESTS\ESP8266\test> pio init --help
Usage: pio init [OPTIONS]
Options:
-d, --project-dir DIRECTORY
-b, --board ID
–ide [clion|codeblocks|eclipse|emacs|netbeans|qtcreator|sublimetext|vim|visualstudio]
-e, --environment TEXT Update existing environment
-O, --project-option TEXT A name=value pair
–sample-code
–no-install-dependencies
–env-prefix TEXT
-s, --silent
-h, --help Show this message and exit.
Try ‘python -m platformio project init -h’ for help.
Error: Invalid value for ‘–ide’: ‘vscode’ is not one of ‘clion’, ‘codeblocks’, ‘eclipse’, ‘emacs’, ‘netbeans’, ‘qtcreator’, ‘sublimetext’, ‘vim’, ‘visualstudio’.
from which –
PS C:!development!!platformio!TESTS\ESP8266\test> python -m platformio project init -h
C:\Users\graha.platformio\python3\python.exe: No module named platformio
If the platformio.ini is correct, and no global libaries are used, and the platform is correctly version fixed, there should be no build errors. It should be reproducible.