-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intellisense fails to find system headers in 1.20.5 (possible cmake integration issue?) #12293
Comments
I confirmed this as well with a simple hello world program using iostream, where 1.19.9 works and 1.20.5 fails. I tried manually forcing the compiler path (typically not required with cmake), using
as set through the command palette, which changes nothing. In both cases it will compile fine, but intellisense is broken in 1.20.5. |
So in the simple cmake hello world project that has the same issue, the c/c++ Log diagnostics is present. I'm not sure why it isn't in the larger project, but I'll focus on the hello world since it still has the problem and will have fewer variables. (But yes, other commands were in the palette too.) Here is the output from that command with v1.20.5:
Github doesn't seem to want to accept my error screenshot, but it's just the typical |
If you can get the debug logging turned on and share the output with us, getting the Log Diagnostics command working is less necessary. Log Diagnostics just grabs the information we're looking for with less hassle than enabling the debug logging. |
The Log Diagnostics output that you shared doesn't have any of the custom configurations sent from CMake Tools in it. So that's a clue for us. |
Ok, I didn't realize this before, but it looks like we configured our extension to hide the "C/C++: Log Diagnostics" command when you're not looking at a C or C++ file. I don't remember the reasoning behind that, but it was probably to ensure that a C or C++ file was open (since sometimes people would run the command before it had any information to share). |
Here's the debug output - lot of messages about failing to configure the compiler, despite it finding the correct path.
|
Thank you. This is certainly odd. I assume that the compiler path is coming from CMake and should be a valid path, but can you confirm that it's valid and not just a stale path in the CMake cache (i.e. if you upgraded Visual Studio or recently)? @Colengms do you know of any changes recently that could cause us not to find the MSVC compiler? I thought that the absolute path was more of a "suggestion" and that we'd pick a different version of cl.exe if the path was slightly off. |
Yes, that is the correct path for my current compiler. My VS tools are up to date, but I don't remember when I last upgraded them - not within the last week or two though. Would it be worth providing logs from 1.19 where this error doesn't occur? |
Yes, the 1.19 logs would be helpful if you'd be willing to share them. Thank you! |
Debug output: (still some failures, but it eventually finds it. Main difference is this version properly indexes the installed windows kit, whereas 20.5 seems not to find it.)
Log diagnostics:
|
No new info in it, but I put the simple test project here, along with the related logs. (They are the same as here, it's just easier for me to organize this way.) Thanks for looking into this! |
@shimaowo We believe this is fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.21.0 (although we weren't able to repro the issue). |
@sean-mcmanus Confirming this appears fixed in 1.21.0 with quick testing of a few projects that were affected. Thanks! |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
When updating to version 1.20.5, intellisense no longer finds system headers (eg, the entire standard library, windows.h, gl/GL.h). The project still builds correctly, but every system header is flagged as an error. Browse functionality to those headers is similarly broken.
Even manually specifying those paths with C_Cpp.default.includePath does not work.
This did work in 1.19.9, and does again after a rollback. Testing a re-upgrade to 1.20.5 breaks again. Clean/etc does not help.
This occurs with multiple cmake-based projects. Nothing relating to cmake or its extensions have updated recently, and I am unaware of a setting to change to affect this.
Steps to reproduce:
Expected behavior:
Intellisense and browse would be able to find system libraries that are used during compile, and not flag them as errors.
Configuration and Logs
Other Extensions
The extension pack v1.3.0:
Additional context
No response
The text was updated successfully, but these errors were encountered: