Open jishihao-001 opened 6 months ago
Could you provide a screenshot of the error? I am unable to reproduce the issue as it is able to find my symbols (see below):
Could you also provide the output of the C/C++: Log Diagnostics command when you are in the file?
sure, I add a gif
the output of the C/C++: Log Diagnostics command
-------- Diagnostics - 4/25/2024, 8:53:17 AM
Version: 1.20.1
Current Configuration:
{
"name": "Win32",
"includePath": [
"e:/project/esl/05-fw-RFv2/FW-RFv2/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\Program Files\\LLVM\\bin\\clang.exe",
"cStandard": "c17",
"cppStandard": "c++14",
"intelliSenseMode": "windows-clang-x64",
"compilerPathIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"intelliSenseModeIsExplicit": true,
"compilerPathInCppPropertiesJson": "C:\\Program Files\\LLVM\\bin\\clang.exe",
"mergeConfigurations": false,
"browse": {
"path": [
"e:/project/esl/05-fw-RFv2/FW-RFv2/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": "${default}"
}
}
cpptools version (native): 1.20.1.0
Translation Unit Mappings:
[ C:\Users\lenovo\Desktop\lab\main.c - source TU]:
Translation Unit Configurations:
[ C:\Users\lenovo\Desktop\lab\main.c ]:
Process ID: 3604
Memory Usage: 51 MB
Compiler Path: C:\Program Files\LLVM\bin\clang.exe
Includes:
C:\Program Files\LLVM\lib\clang\15.0.3\include
G:\ProgramFiles\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include
G:\ProgramFiles\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\atlmfc\include
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt
Defines:
_DEBUG
UNICODE
_UNICODE
Standard Version: c17
IntelliSense Mode: windows-clang-x64
Other Flags:
--clang
--clang_version=150003
--ms_compatibility
Total Memory Usage: 51 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 8181
Thank you for the extra information!
Hi @jishihao-001 . Would you be able to enable the setting "C_Cpp.loggingLevel": "Debug"
, and make another repro video with the Output channel open and set to the C/C++ output channel, as well as having the "Outline" view (on the left) open? That should provide a bunch of information about what's going on in your particular repro.
Sure, please check
@jishihao-001 You don't have the Outline view open. You may need to run the "C/C++: Reset IntelliSense Database" command if the Outline view is missing the symbol you're trying to rename. And also make sure the file is not being excluded via any exclude setting. If you make an edit to main.c, your logging should show a "tag parsing" message if it's not excluded.
sorry for late reply, it was a vacation.
I also met this problem... Do you have any idea now? I tried to find some running logs of the extension in the installation folder but nothing valuable was found.
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
In a c project, when I try to rename function name or variables, i got : A definition for the selected symbol could not be located.
even the function is only defined and used in merely one file.
I do the "rescan", disable and enable the cpptools and restart VSCode, none works.
Steps to reproduce:
Expected behavior: renaming should success
Configuration and Logs
Other Extensions
Extension | Author (truncated) | Version doxdocgen | csc | 1.4.0 cpptools | ms- | 1.20.1 vscode-typings | typ | 0.0.5 clang-format | xav | 1.9.0
Additional context
No response