platformio/platformio-core

Invalid escape character in c_cpp_properties.json

Open

#4,440 建立於 2022年10月11日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)Python (791 fork)batch import
help wantedintegration

倉庫指標

Star
 (7,329 star)
PR 合併指標
 (平均合併 109天 16小時) (30 天內合併 5 個 PR)

描述

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!

貢獻者指南