You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow nonrecursive browse paths from custom providers #13886
Hi! I'm not sure whether to treat this as a bug or a feature request, so feel free to relabel it.
In a c_cpp_properties.json file, you can add a * to the end of a browse path (e.g. C:\\my\\source\\folder\\*) to specify that it should only look for files directly in that folder and not recursively index subfolders. This doesn't seem to work when providing a browse configuration from a custom configuration provider. Cpptools will complain that the path doesn't exist and ignore it:
Unable to index files from non-existent folder: C:\my\source\folder\*
In my case, the provider knows exactly which files are part of the project, and I want to limit which files cpptools indexes as much as possible to prevent it from finding potentially conflicting symbol definitions in unrelated files. Disabling the recursive lookup would help a lot (even better would be if a custom provider could provide a set of files to index instead of a set of directories).
Sean McManus (@sean-mcmanus) would an API change also be required to specify specific files directly via includePath and browse.path in a c_cpp_properties.json file as forcedInclude already supports including specific files?
Or is the API change only required to make this work with custom providers?
Thank you for your help so far!
It's been on our long-term plan to rework the API to allow for specifying specific files, but we hadn't created an issue for it. Thank you for opening the issue for us to track it. We will close this issue in favor of tracking the new one you opened instead.
Activity
icebox-test commentedon Sep 1, 2025
Sean McManus (@sean-mcmanus) was this considered while this issue was fixed?
sean-mcmanus commentedon Sep 4, 2025
icebox-test Hampus Adolfsson (@HampusAdolfsson) https://github.com/microsoft/vscode-cpptools/releases/tag/v1.27.3 has a fix for the
*not being used. Having a provider provide a set of files would require an API change from https://github.com/microsoft/vscode-cpptools-api/issues .icebox-test commentedon Sep 4, 2025
Sean McManus (@sean-mcmanus) would an API change also be required to specify specific files directly via
includePathandbrowse.pathin ac_cpp_properties.jsonfile asforcedIncludealready supports including specific files?Or is the API change only required to make this work with custom providers?
Thank you for your help so far!
I created a related issue in the project you linked microsoft/vscode-cpptools-api#73
bobbrow commentedon Sep 4, 2025
It's been on our long-term plan to rework the API to allow for specifying specific files, but we hadn't created an issue for it. Thank you for opening the issue for us to track it. We will close this issue in favor of tracking the new one you opened instead.