vscode-cpptools
vscode-cpptools copied to clipboard
Outline: no symbols found in document
Environment
Version: 1.84.2 Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e Date: 2023-11-09T10:50:47.800Z Electron: 25.9.2 ElectronBuildId: 24603566 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 6.2.0-36-generic
Bug Summary and Steps to Reproduce
Bug Summary:
1.18.5 version shows "No symbols found in document" in outline and some quick fix actions are no longer available. Downgrading to 1.18.4 fixes the problem.
Steps to reproduce:
- Go to "Exporer" with c++ document active
- Scroll down to Outline
- See error "No symbols found in document"
Expected behavior: Symbols visible in outline.
Configuration and Logs
{
"configurations": [
{
"name": "Linux",
"includePath": [
"/home/grzes/sources/repo/**",
"/usr/include/libxml2"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "c++20",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
Other Extensions
No response
Additional context
No response
@Racer84 The only change in 1.18.5 was https://github.com/microsoft/vscode-cpptools/issues/11693 -- i.e. the issue is caused by the default database location not being usable for some reason. Setting C_Cpp.default.databaseFilename to something like "${workspaceFolder}/.vscode/vc.db" might fix it (it should a be file that isn't duplicated in other workspaces).
Do you have the XDG_CACHE_HOME environment variable set? Is your ~/.cache directory not writable? Is your workspace done "parsing files"?
Do you have the XDG_CACHE_HOME environment variable set?
No, I don't.
Is your ~/.cache directory not writable?
No, it is writable.
Is your workspace done "parsing files"?
Yes, status is "Parsing complete".
@Racer84 Have you modified the databaseFilename? If not, can you go to the default location of ~/.cache/vscode-cpptools/ use ls -l
and see which guid folder is the most recently updated and the go into that folder and use ls -a
and see if you see .browse.VC.db files of size > 0.
@Racer84 Have you modified the databaseFilename?
No , I have not.
If not, can you go to the default location of ~/.cache/vscode-cpptools/ use
ls -l
and see which guid folder is the most recently updated and the go into that folder and usels -a
and see if you see .browse.VC.db files of size > 0.
Here is the log:
racer@nuke:~/.cache/vscode-cpptools$ ls -l
total 8
drwxr-xr-x 2 racer racer 4096 lis 30 18:00 99b862d2745baa04cfeed03ec2f05046
drwxrwxrwx 24 racer racer 4096 lis 30 18:00 ipch
racer@nuke:~/.cache/vscode-cpptools$ cd 99b862d2745baa04cfeed03ec2f05046/
racer@nuke:~/.cache/vscode-cpptools/99b862d2745baa04cfeed03ec2f05046$ ls -laSr
total 965996
-rw-r--r-- 1 racer racer 0 lis 30 18:00 .browse.VC.db-wal
drwxrwxrwx 4 racer racer 4096 lis 20 08:17 ..
drwxr-xr-x 2 racer racer 4096 lis 30 18:00 .
-rw-r--r-- 1 racer racer 32768 lis 30 18:00 .browse.VC.db-shm
-rw-r--r-- 1 racer racer 989134848 lis 30 18:00 .browse.VC.db
@Racer84 Does running the C/C++: Reset IntelliSense Database command from the command palette fix it? Is the .browse.VC.db creation date updated after that?
@Racer84 Does running the C/C++: Reset IntelliSense Database command from the command palette fix it?
No, it does not.
Is the .browse.VC.db creation date updated after that?
racer@nuke:~/.cache/vscode-cpptools/99b862d2745baa04cfeed03ec2f05046$ ls -laSr --time-style=long-iso
total 963708
-rw-r--r-- 1 racer racer 0 2023-12-01 09:11 .browse.VC.db-wal
drwxrwxrwx 4 racer racer 4096 2023-11-20 08:17 ..
drwxr-xr-x 2 racer racer 4096 2023-12-01 09:06 .
-rw-r--r-- 1 racer racer 32768 2023-12-01 09:11 .browse.VC.db-shm
-rw-r--r-- 1 racer racer 986791936 2023-12-01 09:11 .browse.VC.db
I've just upgraded vscode to 1.85.0 and outline problem is no more.
BTW. Since the 1.18.5 changes cache folder location to ~/.cache/vscode-cpptools
previous location ~/vscode-cpptools
should be removed.
@browntarik when the cache path changed, I thought you added code to remove the old location. Did that not make it in?
I am experiencing this problem also. But only when editing a workspace on a remote ssh linux server. My local machine is MacOS and the symbols load fine on the local machine. This used to work on the remote machine, but no longer does. I followed all of the recommendations in this thread, but still no luck.
I tried it in the pre-release version 1.19.1 and it it works again in that version.
@bobbrow No code was added to remove previous location of ~/vscode-cpptools (that wasn't the intended location). See https://github.com/microsoft/vscode-cpptools/pull/11696
Same issues occurred when connecting from Windows 11 to a local VM running Ubuntu Server.
After executing the shell command rm ~/.cache/vscode-cpptools/*
and running the command Developer: Reload Window
from the command palette, the problem was resolved.
C/C++ extension version: v1.19.1
VSCode Version: 1.85.1 (system setup) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:49:37.021Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045
Linux ubuntu18044 5.4.0-72-generic #80~18.04.1-Ubuntu SMP Mon Apr 12 23:26:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I don't know if this is related but I am having a similar, yet weirder issue, on version 1.85.1 in Linux. The very same file will show a correct outline if I open it as a file. No outline is shown if I open it as a folder. This applies to all Python files of course not just this one.
Version: 1.85.1
Commit: Unknown
Date: 2023-12-14T20:02:29.406Z
Electron: 25.9.8
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.6.10-1-MANJARO
Hey @sean-mcmanus, this issue might need further attention.
@Racer84, you can help us out by closing this issue if the problem no longer exists, or adding more information.
Problem does not exist in current version, closing issue.