Find all references (Experimental Version)
Would be great to have Find all references working. Huge helper in large projects.
This issue is still not fixed until now. Both on my Win10 and Ubuntu platform.
Would be great to have Find all references working. Huge helper in large projects.
I find a solution, install and run "gtags" in your project folder, after "GPATH", "GRTAGS", "GTAGS" files are created in your folder, your "peek references" function will work normally.
Really looking forward to it!!!
Looking forward to it, too.
But if you are super eager to use "Find all references" right now you can just install scope4code. It's very easy and works immediately without any configuration (except installing cscope by a single line of sudo apt-get install cscope).
please install C++ Intellisense extention it has been solved
you also have to install gnu-global,And run command “gtags” in the root of project.
- download: http://adoxa.altervista.org/global/
- add /bin to your PATH
- run command "gtags" in the root of project.



please install C++ Intellisense extention it has been solved
shift+F12 still not working for me with intellisense?
please install C++ Intellisense extention it has been solved
shift+F12 still not working for me with intellisense?
me either
Eager to use this feature. This is the only issue that stops me from switching to Code from CLion.
please install C++ Intellisense extention it has been solved
I don't think so
please install C++ Intellisense extention it has been solved
shift+F12 still not working for me with intellisense?
you also have to install gnu-global,And run command “gtags” in the root of project.
- download: http://adoxa.altervista.org/global/
- add /bin to your PATH
- run command "gtags" in the root of project.

We're getting closer to having a preview available for this feature. However, it doesn't look like it will be ready in time for our current release. We plan to have it ready for Insiders in the first half of July. Thank you for your patience and understanding.
please install C++ Intellisense extention it has been solved
shift+F12 still not working for me with intellisense?
you also have to install gnu-global,And run command “gtags” in the root of project.
- download: http://adoxa.altervista.org/global/
- add /bin to your PATH
- run command "gtags" in the root of project.
I installed Global (apt install) version 6.6.2 and ran gtags, the GPATH, GRTAGS, GTAGS files were created, restarted VSCode but still 'Find All References' doesn't work. Can you tell me what I'm missing? Thanks
@jiayuqicz what platform do you use, windows or Linux?
@jiayuqicz what platform do you use, windows or Linux?
windows
please install C++ Intellisense extention it has been solved
shift+F12 still not working for me with intellisense?
you also have to install gnu-global,And run command “gtags” in the root of project.
- download: http://adoxa.altervista.org/global/
- add /bin to your PATH
- run command "gtags" in the root of project.
I installed Global (apt install) version 6.6.2 and ran gtags, the GPATH, GRTAGS, GTAGS files were created, restarted VSCode but still 'Find All References' doesn't work. Can you tell me what I'm missing? Thanks
eh…,I don't know,it just work on my computer. maybe you can try to read the instruction of the extention and try again
@sean-mcmanus when this feature is finished, I hope cpptools can support this commands: getReferencesCommand. When I pass file uri, line and column as parameters of this command, it can return all references location to me regardless of this file is opened or not. Could you add this feature to "Find all references" for me ?
Until this is ready, I have things working pretty well with the vscode-clangd extension and this extension both enabled. Here are the key things you need to add to your settings:
"C_Cpp.autocomplete": "Disabled", // So you don't get autocomplete from both extensions.
"C_Cpp.errorSquiggles": "Disabled", // So you don't get error squiggles from both extensions (clangd's seem to be more reliable anyway).
"clangd.path": "/usr/local/opt/llvm/bin/clangd", // Path to clangd. Note it might be clangd-8 on Linux. Also you need version 8 at least.
"clangd.arguments": [
"-background-index" // So Find All References actually works properly.
],
// Don't disable the intellisense engine otherwise switch header/source (Alt-O) doesn't work.
Also I then symlink compile_commands.json from my source directory to the build directory.
It is a little flaky. Sometimes clangd seems to get stuck and I have to reload the window. Also while error squiggles, Find All Reference, and Go To Definition work pretty reliably, Find Symbol doesn't. Still I think it is the best option until this extension supports it properly.
To add to what @Timmmm said, note that --background-index was introduced in clangd-8. I found out the hard way that clangd-7 doesn't expect that argument, and the completion server will crash inside of vscode with no indication of why (I had to write a wrapper script that redirected stderr/stdout to a file to inspect later in order to find out what was going on).
We're getting closer to having a preview available for this feature. However, it doesn't look like it will be ready in time for our current release. We plan to have it ready for Insiders in the first half of July. Thank you for your patience and understanding.
Is this implementation going to work without requiring installation of external tools? It's hard for me to get tools, and Eclipse CDT provides this feature without them.
Is this implementation going to work without requiring installation of external tools? It's hard for me to get tools, and Eclipse CDT provides this feature without them.
:). Yes, indexing has been a core feature of CDT since the beginning. It's hard to do right enough and fast enough so I appreciate the time cpptools is taking to get there.