compile_commands.json file not found if created after the initial editor load and its path contains variables #7241
Labels
bug
Feature: Compile Commands
Feature: Configuration
An issue related to configuring the extension or IntelliSense
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
Milestone
Type: LanguageService
Describe the bug
When the
compile_commands.json
file path includes variables like${workspaceFolder}
the file is found if it exists only during the initial editor load, but not if it was created after the editor was started.Steps to reproduce
Make a simple program that includes a header from an external library, and set the
compileCommands
item in thec_cpp_properties.json
file (or in more general settings) to something like${workspaceFolder}/build/compile_commands.json
. Make sure the build folder is clean and then compile the program to generate thecompile_commands.json
file. The include directives should still be marked with red lines indicating that the extension couldn't locate thecompile_commands.json
file.Example (lib can be any available library):
main.cpp
CMakeLists.txt
c_cpp_properties.json
Expected behavior
I expect the include paths to get resolved shortly after the
compile_commands.json
file is created.Logs
The text was updated successfully, but these errors were encountered: