microsoft / microsoft/vscode-cpptools

Intellisense does not work as expected when too many header files included

Offen
#8,610 22 Kommentare 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@michelleangela arbeitet bereits daran.

Seit 07.1.2022.

bug Language Service Visual Studio
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Bug type: Language Service

Describe the bug

  • OS and Version: Windows 11 22000
  • VS Code Version: 1.63.2 (I have tried the insider version, the results are the same)
  • C/C++ Extension Version: 1.7.1
  • If using SSH remote, specify OS of remote machine: I use Remote - WSL and the OS of WSL2 Ubuntu 20.04
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

I was working on a gazebo plugin for ROS2. In some source files, the Intellisense stops work properly. After some attempts, I found a minimum source file to reproduce the problem:

#include <gazebo/common/Plugin.hh>

static double test(void)
{
    double aaaa = 1.0, bbbb=2.0;
    double c = aa // Use hot key here to get suggestion list from Intellisense
}

When the header file <gazebo/common/Plugin.hh>(https://github.com/arpg/Gazebo/blob/master/gazebo/common/Plugin.hh) is not included, the Intellisense works as expected. However, if <gazebo/common/Plugin.hh> is included, the Intellisense still works but not as expected, as shown in the following images:

Good:
image
Bad:
image

Then I tried expanding the <gazebo/common/Plugin.hh>. It seems the problem is not caused by a specific header file, but the number of header files. When too many header files are included, Intellisense stops work as expected, as shown in the following images:

Good:
image
Still good:
image
Bad:
image

I have tried setting Intellisense memory limit and cache size:

"C_Cpp.intelliSenseMemoryLimit": 16384,
"C_Cpp.intelliSenseCacheSize": 100000000000,

No thing changed.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.