I was able to solve my problem below by restarting VS2019, this may be a bug so I’m reporting it. After restarting the Clang autodetect bar popped up and gave me the option to cache the required gcc directories.
I have a Linux project using MSBuild in VS2019. Recently I upgraded to use the latest 5.5 preview 4 beta. In the project I changed the remote machine and now all of my intellisense directories are gone, I am using Clang. It can find my custom directories but it cannot find the C++ (gcc) directories: i.e. ‘#include <vector>’ shows an error. Within the MSBuild settings page I clicked on ‘Rebuild MSBuild and intellisense files for this toolchain’ and VisualGDB started scanning for GCC settings but my intellisense never came back.
I really do not want to manually enter GCC include paths since in the past VisualGDB found these automatically. In the past I’ve always used VS intellisense, this is the first time using Clang.
The easiest way to solve this would be to create another similar project from scratch using the VisualGDB Project Wizard. It would automatically test the connection to the target, cache the necessary include directories and make sure that all projects using this target would load correctly.
Is there a way to use an existing remote machine’s cached folders/files? The setup I have here at work is that we have multiple remote machines all with the same image. If a new remote machine is added there is no need to grab those files since I can use another machine’s cached files and will still work.
I understand the solution you proposed but given how machines change IP and new ones are added, for my setup, creating new projects every time isn’t the smoothest solution.
VisualGDB stores the cached headers under %LOCALAPPDATA%\VisualGDB\RemoteSourceCache\<host name>. If you would like to avoid re-downloading them, consider simply copying or symlinking some of the directories there.