microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.53k stars 1.56k forks source link

"#include errors detected. Consider updating..." | Unexpected Intellisense errors occuring on v1.19.4 #12049

Closed 3thanjmac closed 7 months ago

3thanjmac commented 8 months ago

Environment

Bug Summary and Steps to Reproduce

Bug Summary: Intellisense displays error on Unreal Engine 5 C++ files stating source files could not be opened. Tried rebuilding from Visual Studio as well as refreshing Visual Studio code from the Unreal Editor. Error is not present in C/C++ version 1.18.5.

Steps to reproduce:

  1. Update C/C++ Intellisense extension to version 1.19.4
  2. Open Unreal Engine 5 project and corresponding C++ files in Visual Studio

Expected behavior: Intellisense errors appear on project's ".h" and ".cpp" files with the following errors:

" #include errors detected. Consider updating your compile_commands.json or includePath. Squiggles are disabled for this translation unit (/Users/ethanjmac/Documents/Unreal Projects/DungeonCrypt/Source/DungeonCrypt/TriggerComponent.cpp).C/C++(1696) "

" cannot open source file "initializer_list" (dependency of "/Users/ethanjmac/Documents/Unreal Projects/DungeonCrypt/Intermediate/Build/Mac/arm64/DungeonCryptEditor/Development/Engine/SharedPCH.Engine.Cpp20.h")C/C++(1696) "

c_cpp_properties.json log_diagnostics.txt

Configuration and Logs

Configuration and logs submitted above.

Other Extensions

No response

Additional context

No response

sean-mcmanus commented 8 months ago

This looks like it's caused by the C++ system includes not being used. Can you look at your C/C++ logging with C_Cpp.loggingLevel set to "Debug". Can look for a failure in your C/C++ logging in regards to compiler querying?

github-actions[bot] commented 7 months ago

This issue has been closed because it needs more information and has not had recent activity.

sean-mcmanus commented 1 week ago

Another user reported this at https://github.com/Microsoft/vscode-cpptools/issues/12940 .