Repository navigation
Description
Environment
- OS and Version: tried on windows, rhel9, ubuntu.
- VS Code Version: 1.115.0
- C/C++ Extension Version: 1.31.4
- If using SSH remote, specify OS of remote machine: experienced both ssh and local instances.
If I use the shortcut to get the header file of the cpp I'm currently exploring, the loading animation doesn't show up. Unfortunately, this process can last very long and sometimes (I think maybe because of a timer?) it expires. What's even worse is that, unlike any other vscode feature, this can't be stopped by any user interactions. As a result, if I get bored about the waiting times I keep doing something else but all of a sudden the header shows up. That happens very often in my environments.
I would love to contribute to this project by solving this by my own and opening the PR if I'm allowed to do so. Thank you in advance.
Bug Summary and Steps to Reproduce
Bug Summary:
The shortcut to get to the header files could result in unexpected behavior. You probably need to work on a big repository for this action to experience long enough waiting times.
Steps to reproduce:
- Go to a cpp file.
- Use the shortcut to get to the header file of that cpp.
Expected behavior:
- Loading animation won't show up.
- The action can't be stopped.
- If you keep doing something else, the header file could show up all of a sudden.
Configuration and Logs
-------- Diagnostics - 4/15/2026, 3:40:43 PM
Version: 1.31.4
Current Configuration:
{
"name": "Linux",
"includePath": [
"/root/git/*******"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "c++98",
"intelliSenseMode": "linux-gcc-x64",
"compilerPathInCppPropertiesJson": "/usr/bin/gcc",
"intelliSenseModeIsExplicit": false,
"cStandardIsExplicit": false,
"cppStandardIsExplicit": false,
"mergeConfigurations": false,
"recursiveIncludes": {},
"recursiveIncludesReduceIsExplicit": false,
"recursiveIncludesPriorityIsExplicit": false,
"recursiveIncludesOrderIsExplicit": false,
"compilerPathIsExplicit": false,
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {},
"filesExclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true
},
"workbenchSettingsEditor": "ui"
}Other Extensions
No response
Additional context
Unfortunately I can't share much of the logs because I'm on a company environment.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
sean-mcmanus commentedon Apr 15, 2026
Marco De Meco (@MarcoDeMeco) What does "shortcut to get to the header file" mean? Are you referring to the Switch Header/Source command or right-click option?
sean-mcmanus commentedon Apr 15, 2026
Marco De Meco (@MarcoDeMeco) I assume the answer to my last question is "yes". When you set C_Cpp.loggingLevel to "Debug" what output do you see in the C/C++ logging? Is it still tag parsing files? The switch operation might be blocked on tag parsing.
MarcoDeMeco commentedon Apr 16, 2026
Hi Sean McManus (@sean-mcmanus) thank you for your prompt response, yes I meant the Switch Header/Source command (I use the default shortcut alt+o). Here's the debug level logging:
here the extension spent ~10 seconds. And then:
To me it's not a big deal that it takes 10 seconds (I mean if it takes more than 2 seconds I instantly find it manually). I mean I get it I'm on a big repository. It's the fact that during these 10 seconds the loading animation doesn't show up and if I perform any action it doesn't stop, so at any moment while I'm editing the cpp file the header file can popup.
I would love to contribute to this project by trying opening a PR for it if I'm allowed to.
sean-mcmanus commentedon Apr 16, 2026
Marco De Meco (@MarcoDeMeco) It's caused by our message handler thread being stuck some other operation, mostly likely by an IntelliSense operation -- some "invoked" command before your shown logging. If the message handling thread is idle it shouldn't be blocked. Your logging indicates the recursive includes expansion might be causing the delay, so removing the recursives includes (
**in the includePath) or switching to"recursiveIncludes": { "reduce": "never" }may help. That particular implementation is handled in our closed source cpptools process.Copilot was able to add the missing progress indicator: #14386
MarcoDeMeco commentedon Apr 17, 2026
That's great, thank you very much.