platformio/platformio-core

Invalid escape character in c_cpp_properties.json

Open

#4.440 aberto em 11 de out. de 2022

Ver no GitHub
 (4 comments) (0 reactions) (0 assignees)Python (791 forks)batch import
help wantedintegration

Métricas do repositório

Stars
 (7.329 stars)
Métricas de merge de PR
 (Mesclagem média 109d 16h) (5 fundiu PRs em 30d)

Description

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!

Guia do colaborador