简体   繁体   English

C++ Intellisense 并不总是在 vscode 中工作

[英]C++ Intellisense not always working in vscode

While in the middle of working on my app I had an odd issue and, while trying to figure it out, I noticed right clicking anywhere on my code doesn't give me the usual options.在开发我的应用程序的过程中,我遇到了一个奇怪的问题,在试图解决这个问题时,我注意到右键单击我的代码上的任意位置并没有给我通常的选项。

The below image shows what my options are for anything that I click.下图显示了我单击的任何内容的选项。 I should have double or more options to choose from, like opening the document I've right clicked.我应该有两个或多个选项可供选择,例如打开我右键单击的文档。

The odd issue (which may or may not be related) I had before this started happening was I that I just created a new header and source file.在这开始发生之前我遇到的奇怪问题(可能相关也可能不相关)是我刚刚创建了一个新的 header 和源文件。 In the source file, VSCode was complaining that it could not find the new header file that I included.在源文件中,VSCode 抱怨它找不到我包含的新 header 文件。 I tried including it in a different file, and it could find it there.我尝试将它包含在不同的文件中,它可以在那里找到它。 I'm very confused as to why two files in the same directory are getting different results when they include the same header file.我很困惑为什么同一目录中的两个文件在包含相同的 header 文件时会得到不同的结果。

在此处输入图像描述

Does anyone know what happened, and how to fix it?有谁知道发生了什么,以及如何解决?

I have restarted VSCode multiple times, as well as my computer.我已经多次重新启动 VSCode,以及我的计算机。

I do not know how or why, but while editing code, my c++ extension was uninstalled.我不知道如何或为什么,但在编辑代码时,我的 c++ 扩展被卸载。

Installing it again has resolved the issue.再次安装它已经解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM