在win10 x64环境下安装vscode和插件platformio对嵌入式单片机 stm32f107进行编程。在编辑过程中发现c_cpp_properties在vscode启动后加载platformio时会被用默认信息覆盖,导致自己增加的路径失效。

在网上搜索有人发现 cmake tools helper插件会重写c_cpp_properties。于是搜索插件把所有和CMAK相关的插件全部卸载。毫无效果。

在仔细分析其加载过程后发现,每次加载 platformio时,其自动运行 rebuild intellisense index命令,该命令运行后c_cpp_properties文件被重置。于是查找platformio配置项  Auto Rebuild Autocomplete Index 把该选项的win10+vscode+platformio中c_cpp_properties被覆盖的问题勾去掉 后重启软件,问题解决。

相关文章: