vscode intellisense not working vscode 语法检查 工作不正常 [bug记录]

@TOC

c/c++ intellisense not working

项目场景:

Vscode版本:1.56.2

我在使用Vscode进行c/c++开发

我同时在使用Gitlens插件,并在一个Workspace中进行操作

问题描述:

此时在vscode中,c/c++插件的Intellisense模块工作不正常,无法实时分析你的代码问题并显示到Problems中。

原因分析:

我尝试过很多办法,配置compilerPath,C_Cpp.default.intelliSenseMode,更换各种编译器等等,都无法解决。直到我将目光投向workspace

因为太多办法尝试过之后都无果,我甚至怀疑是电脑的问题,准备发Issue,但是我尝试着开了个新folder,随便写了个文件,Intellisense正常了。于是我将目光投向workspace,发现如下问题。

1
2
3
4
5
6
7
8
"folders": [
{
"path": "../",
},
{
"gitlens"*************************
}
],

Folder里面gitlens的配置项。我去掉gitlens的配置项之后就没问题了,同时我也测试了增加别的文件夹,发现没问题,只是gitlens的配置项有问题。

解决方案:

修改你的workspace配置文件,删除folders中的gitlens相关配置项。

具体gitlens配置项长什么样子我忘了,我只有一个项目出过这个问题。当时也没有备份文件。(谁会去备份问题文件啊


vscode intellisense not working vscode 语法检查 工作不正常 [bug记录]
http://blog.luoshenseeker.top/2021/06/10/c-intellisense/
作者
luoshenseeker
发布于
2021年6月10日
许可协议