Skip to content

Symbols lookup - different multifolder workspaces #12903

@Racer84

Description

@Racer84

Environment

  • OS and Version: Ubuntu 22.04.5 LTS
  • VS Code Version:
    Version: 1.94.2
    Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
    Date: 2024-10-09T16:08:44.566Z
    Electron: 30.5.1
    ElectronBuildId: 10262041
    Chromium: 124.0.6367.243
    Node.js: 20.16.0
    V8: 12.4.254.20-electron.0
    OS: Linux x64 6.5.0-44-generic
  • C/C++ Extension Version: v1.22.10

Bug Summary and Steps to Reproduce

Being in the first workspace, I want to prevent searching for symbols from the second workspace. Both workspaces contain, among other things, definitions of the same symbols but from different branches.
I set in each workspace separately, in c_cpp_properties.json:


            "browse": {
                "path": [
                  "${workspaceFolder}/",
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": "${workspaceFolder}/.vscode/browse.db" // Workspace-specific index database
              }

and in .code-workspace:

"C_Cpp.intelliSenseCachePath": "${workspaceFolder}/.vscode/ipch/"

but unfortunately it didn't help. When I click on a symbol in the first workspace it opens its definition from the second workspace.c_cpp_properties.json

Configuration and Logs

-------- Diagnostics - 10/29/2024, 10:36:03 PM
Version: 1.22.10
Current Configuration:
{
"name": "Linux",
"includePath": [
"/home/grzes/sources/repo_aib/alior/"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "linux-gcc-x64",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"compilerPathInCppPropertiesJson": "/usr/bin/gcc",
"mergeConfigurations": false,
"browse": {
"path": [
"/home/grzes/sources/repo_aib/alior/
",
"${workspaceFolder}"
]
}
}
Modified Settings:
{
"C_Cpp.default.includePath": [
"${workspaceFolder}/",
"/usr/include"
],
"C_Cpp.default.intelliSenseMode": "gcc-x64",
"C_Cpp.default.compilerPath": "/usr/bin/gcc",
"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": false,
"C_Cpp.default.enableConfigurationSquiggles": false,
"C_Cpp.intelliSenseCachePath": "${workspaceFolder}/.vscode/ipch/",
"C_Cpp.updateChannel": "Insiders"
}
Additional Tracked Settings:
{
"editorTabSize": 4,
"editorInsertSpaces": true,
"editorAutoClosingBrackets": "languageDefined",
"filesEncoding": "utf8",
"filesAssociations": {
".plsql": "sql",
"
.inc": "xml",
".cfg": "xml",
"
.req": "xml",
"readme": "cpp",
".tcc": "cpp",
"
.ipp": "cpp",
"string": "cpp",
"iostream": "cpp",
"bitset": "cpp",
"random": "cpp",
"numeric": "cpp",
"ostream": "cpp",
"deque": "cpp",
"rope": "cpp",
"slist": "cpp",
"list": "cpp",
"fstream": "cpp",
"*.ixx": "cpp",
"iosfwd": "cpp",
"thread": "cpp",
"ranges": "cpp",
"tuple": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"string_view": "cpp",
"map": "cpp",
"algorithm": "cpp",
"unordered_map": "cpp",
"array": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"initializer_list": "cpp",
"span": "cpp",
"regex": "cpp",
"valarray": "cpp",
"forward_list": "cpp",
"hash_map": "cpp",
"hash_set": "cpp",
"utility": "cpp",
"source_location": "cpp",
"any": "cpp",
"cstdlib": "cpp"
},
"filesExclude": {
"
/.git": true,
"/.svn": true,
"
/.hg": true,
"/CVS": true,
"
/.DS_Store": true,
"/Thumbs.db": true,
"
/.bak": true,
"**/
.BAK": true,
"/*.d": true,
"
/.o": true
},
"filesAutoSaveAfterDelay": false,
"editorInlayHintsEnabled": true,
"editorParameterHintsEnabled": true,
"searchExclude": {
"/node_modules": true,
"
/bower_components": true,
"**/
.code-search": true,
"/home/grzes/sources/repo/*": true
},
"workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.22.10.0
Current database path: /home/grzes/.cache/vscode-cpptools/8660d1e415d99c9445fc16bbcc1eec57/.browse.VC.db
No active translation units.

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions