Open dahai-zhou opened 1 week ago
I don't know why the workspace folder wouldn't be processed, i.e. with "Processing folder (recursive)" logging.
Do you have any "Folder: " logging when you generate the c_cpp_properties.json?
Do you have any "Folder: " logging when you generate the c_cpp_properties.json?
Could you let me know how to check the logging? Or any more log file you want?
Do you have any "Folder: " logging when you generate the c_cpp_properties.json?
Could you let me know how to check the logging? Or any more log file you want?
Here is the log when I input "C_Cpp.ConfigurationEditUI" after delete the c_cpp_properties.json:
Intellisense update pending for: file:///d%3A/BHS-BIOS/ByteDanceUefiPkg/ByteDanceUefiPkg/Include/ByteDebug.h Shutting down IntelliSense server: D:\BHS-BIOS\ByteDanceUefiPkg\ByteDanceUefiPkg\Include\ByteDebug.h LSP: (received) cpptools/didChangeVisibleTextEditors LSP: (received) cpptools/didChangeCppProperties (id: 23) Attempting to get defaults from C++ compiler in "compilerPath" property: 'cl.exe' Attempting to get defaults from C compiler in "compilerPath" property: 'cl.exe' Folder: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\VC\TOOLS\MSVC\14.29.30133\ATLMFC\INCLUDE\* will be indexed Folder: C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\VC\TOOLS\MSVC\14.29.30133\INCLUDE\* will be indexed Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\CPPWINRT\ will be indexed Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\SHARED\ will be indexed Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\UCRT\ will be indexed Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\UM\ will be indexed Folder: C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\WINRT\ will be indexed LSP: Sending response (id: 22) LSP: (invoked) cpptools/didChangeVisibleTextEditors LSP: (invoked) cpptools/didChangeCppProperties (id: 23) LSP: Sending response (id: 23) LSP: (received) cpptools/didChangeCppProperties (id: 24) LSP: (invoked) cpptools/didChangeCppProperties (id: 24) LSP: Sending response (id: 24)
@sean-mcmanus
Environment
Bug Summary and Steps to Reproduce
When I use "Go To Definition" in .c, it always jump to .h, not the function code in .c. After debug, I found the root cause is C/C++ not scan my code folder instead only scan my Visual Studio folder, here is the log for
cpptools/resetDatabase
LSP: (received) cpptools/resetDatabase LSP: (invoked) cpptools/resetDatabase Creating/updating compiler cache data tables (previously: 0) Code browsing service initialized Discovering files... Populating file name cache... Done populating filename cache. Elapsed time: 0 ms Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\SHARED\ Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\UM\ Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\CPPWINRT\ Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\UCRT\ Processing folder (recursive): C:\PROGRAM FILES (X86)\WINDOWS KITS\10\INCLUDE\10.0.19041.0\WINRT\ Processing folder (non-recursive): C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\VC\TOOLS\MSVC\14.29.30133\ATLMFC\INCLUDE Processing folder (non-recursive): C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\VC\TOOLS\MSVC\14.29.30133\INCLUDE Discovering files: 4871 file(s) processed 0 file(s) removed from database Done discovering files. Populating include completion cache. Parsing remaining files... Parsing: 0 files(s) processed Done parsing remaining files. Database safe to open.
Actually I have a code workspace like this:
It has nothing to do with the .vscode/c_cpp_properties.json because I tried to delete it. I put the same code folder from remote SSH server (Windows) to local Windows system, the issue disappeared. Uninstall VS Code Server and install it again (so re-install the C/C++ extension), issue still happen. Uninstall VS Code on my local computer and reinstall it again, issue still happen.
I suspect it has something to do with my remote server, like network or something, but do not know how to debug further.
Configuration and Logs
Other Extensions
Disable all others, still happen.
Additional context
Add #1: The Extension UI is loading forever, and the status is not synced with SSH server. Maybe this could help.
Here is installing log from Server output: 2024-09-30 16:20:16.099 [info] Downloaded extension to file:///c%3A/Users/Administrator/.vscode-server/data/CachedExtensionVSIXs/781492cc-f7b8-4f25-ad22-4dc571903101 2024-09-30 16:20:16.105 [info] Installing extension: ms-python.python {"installOnlyNewlyAddedFromExtensionPack":false,"isApplicationScoped":false,"profileLocation":{"$mid":1,"fsPath":"c:\Users\Administrator\.vscode-server\extensions\extensions.json","_sep":1,"external":"file:///c%3A/Users/Administrator/.vscode-server/extensions/extensions.json","path":"/C:/Users/Administrator/.vscode-server/extensions/extensions.json","scheme":"file"},"productVersion":{"version":"1.93.1","date":"2024-09-11T17:20:05.685Z"}} 2024-09-30 16:21:28.939 [info] Downloaded extension to file:///c%3A/Users/Administrator/.vscode-server/data/CachedExtensionVSIXs/958349ab-bfa0-4054-9a0c-3747c1dd7d7c 2024-09-30 16:21:28.977 [info] Installing extension: ms-vscode.cpptools {"installOnlyNewlyAddedFromExtensionPack":false,"isApplicationScoped":false,"profileLocation":{"$mid":1,"fsPath":"c:\Users\Administrator\.vscode-server\extensions\extensions.json","_sep":1,"external":"file:///c%3A/Users/Administrator/.vscode-server/extensions/extensions.json","path":"/C:/Users/Administrator/.vscode-server/extensions/extensions.json","scheme":"file"},"productVersion":{"version":"1.93.1","date":"2024-09-11T17:20:05.685Z"}} 2024-09-30 16:21:30.928 [info] Extracted extension to file:///c%3A/Users/Administrator/.vscode-server/extensions/ms-vscode.cpptools-1.22.6: ms-vscode.cpptools 2024-09-30 16:21:30.941 [info] Renamed to c:\Users\Administrator.vscode-server\extensions\ms-vscode.cpptools-1.22.6 2024-09-30 16:21:30.987 [info] Extension installed successfully: ms-vscode.cpptools file:///c%3A/Users/Administrator/.vscode-server/extensions/extensions.json 2024-09-30 16:24:12.859 [info] New EH opened, aborting shutdown
Add #2: Some error code in Pty Host (Remote) 2024-09-30 16:19:15.125 [warning] Shell integration cannot be enabled for executable "C:\Windows\System32\cmd.exe" and args /c (powershell -Command "$ProgressPreference = 'SilentlyContinue'; (Invoke-WebRequest -TimeoutSec 7 -Uri http://metadata.google.internal/computeMetadata/v1/instance/id -UseBasicParsing -Headers @{\"Metadata-Flavor\"=\"Google\"}).Content") & exit /b 0
and also in Pty Host 2024-09-30 16:19:06.148 [warning] Shell integration cannot be enabled for executable "C:\Windows\System32\cmd.exe" and args /c (type "C:\Users\Admin\AppData\Local\Temp\vscode-linux-multi-line-command-XX.XX.XX.115-512463630.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 60576 "XX.XX.XX.115" powershell) & exit /b 0 Maybe this could help.