platformio/platformio-core

Invalid escape character in c_cpp_properties.json

Open

#4440 aperta il 11 ott 2022

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)Python (791 fork)batch import
help wantedintegration

Metriche repository

Star
 (7329 star)
Metriche merge PR
 (Merge medio 109g 16h) (5 PR mergiate in 30 g)

Descrizione

VSCode is suddenly unhappy with c_cpp_properties.json. My platformio.ini file contains the build flag

-DTEMPLATE_PLACEHOLDER="\'\~\'"

which yields to the following in c_cpp_properties.json:

image

with the message "Invalid escape character in string. jsonc(261)"

Everything compiles just fine but I have to manually fix c_cpp_properties.json in order for Intellisense to work properly. I did not have this problem before but I'm not sure what caused it. Any help appreciated!

Guida contributor