platform-ststm32: Bug with IntelliSense and paths
Reported here on Github as per request from the forums https://community.platformio.org/t/bug-with-intellisense-and-paths/30269
Configuration
Operating system: Ubuntu 22.04.1 LTS x86_64, kernel 5.15.0-52-generic
PlatformIO Version (platformio --version):

Description of problem
I have been getting red squiggly lines from IntelliSense in VS Code on my includes (even of Arduino.h) with PIO on Ubuntu 22, but I have also found the solution.
cannot open source file "Arduino.h"C/C++(1696)
This is the exact error I am getting:
Failed to parse
"/home/ ... /.vscode/c_cpp_properties.json": Unexpected token ( in JSON at position 85
When I go and have a look in c_cpp_properties.json it is very clear that the error is reported correctly.

By removing the backslashes, the error is resolved, and the red squiggly lines go away. However, c_cpp_properties.json is autogenerated, and the file explicitly advises against manual edits, so it is eventually just re-generated, and the error returns.
What can I do to fix this permanently?
Let me know if I need to supply more information.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
Hi @RasmusAPedersen ! Thanks for reporting. I’ve pushed an updated package with a fix, please pull the changes via
pio platform update ststm32.@valeros did we add escaping on the dev-platform side? If we remove it, does it break SCons?
@fpistm, thanks. Please don’t remove it 👍