Bug with IntelliSense and paths

Unfortunately, I’m not quite sure where to post this, but I hope this is OK.

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.

Interesting, please report this bug to Issues · platformio/platformio-core · GitHub.

Thank you, will do.

Reported here:

Can you also add the platformio.ini of the project in the issue?

The bug was fixed with a new update. All I had to do was to update as instructed in the github issue.

Cheers!