Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Find all references" Not working #404

Closed
alexdima opened this issue Dec 12, 2016 · 22 comments
Closed

"Find all references" Not working #404

alexdima opened this issue Dec 12, 2016 · 22 comments

Comments

@alexdima
Copy link
Member

Moved from microsoft/vscode#17070

From @dfroze


Version 1.7.2
Commit 7ba55c5860b152d999dda59393ca3ebeb1b5c85f
Date 2016-11-21T22:14:18.217Z
Shell 1.3.8
Renderer 52.0.2743.82
Node 6.5.0

Since the first time I installed the vscode till now (so it isn't only just recent), this feature never worked for me. It always showed an empty list. I thought that it was a cpptool problem but they never responded.
Can anyone help me with it? Do I need to configure something !?

Thank you.

@sean-mcmanus
Copy link
Contributor

What extension do you have installed? I assume the C/C++ extension? You may need to set your include paths by running C/Cpp: Edit Configurations and modifying the c_cpp_properties.json.

@dfroze
Copy link

dfroze commented Dec 15, 2016

Hy @sean-mcmanus. Thank you for the fast reply.
Yes I have C/C++ extension.
I have a big project that contains a lot of *.h in include folders and src folders, how should I set this in json? Do I have to add all possible paths to it? What about .c/.cpp files?

Also, just found the console and am seeing a lot of errors there. Not sure if there are from the extension or vscode.

Error: Error: Command failed: global --encode-path " " -xa config_data
global: unrecognized option '--encode-path'
Usage: global [-aGilnqrstTvx][-e] pattern
global -c[qrsv] prefix
global -f[anqrstvx] files
global -g[aGilnoOqtvx][-e] pattern
global -I[ailnqtvx][-e] pattern
global -P[aGilnoOqtvx][-e] pattern
global -p[qrv]
global -u[qv]
global --encode-path " " -xa config_data (exited with error code 2)

Error: Error: Command failed: global -u
Warning: 'file name.odt' ignored, because it includes blank.
Warning: 'file name.odt' ignored, because it includes blank.
Warning: 'file name.odt' ignored, because it includes blank.
Warning: 'file name.rc' ignored, because it includes blank.
Warning: 'file name.pdf' ignored, because it includes blank.
Warning: 'file name.pdf' ignored, because it includes blank.
Warning: 'file name.pdf' ignored, because it includes blank.
Segmentation fault
global -u (exited with error code 1)A.logExtensionHostMessage @ extensionHost.ts:293
extensionHost.ts:293 [Extension Host] Object

I've modified the paths from warning, they don't point to the same file.
Thank you for your help

@sean-mcmanus
Copy link
Contributor

Sorry, I misunderstood your report originally. The C/C++ extension doesn't currently implement Find All References. The option shouldn't be shown for C/C++ files unless you have some other extension installed that is trying to handle it.

@dfroze
Copy link

dfroze commented Dec 15, 2016

You are right. It was an other extension.
It would be great and a really helpful to have this feature working properly.
I would like to help if possible.

@BillDenton
Copy link

Issues #404 and #388 appear to be the same.

@BillDenton
Copy link

Also seems to be the same as #361

@eddy-geek
Copy link

Is this on the roadmap? Is it technically difficult?

I feel like this highly useful navigation feature (the only approximation of "Call hierarchy" we can have for now) should be higher priority...

It's also a jarring user-experience, I spent a few minutes hitting Shift+F12 repeatedly and wondering why vscode was broken, until I found out that it worked everywhere else (python, typscript, go...) but c++.

@bobbrow
Copy link
Member

bobbrow commented Mar 14, 2017

Yes, it's on the roadmap, but it's not first in line. We can't really do this very accurately until proper intellisense is added in. The tag parser we use for autocomplete right now doesn't have any semantic knowledge of symbols. It doesn't see local variables either.

@bobbrow
Copy link
Member

bobbrow commented Mar 14, 2017

Actually, we have another issue tracking "find all references" (#15). I will close this one.

@dalbert2
Copy link

The search tool (magnifying glass in the left-side toolbar) will display all references

@princehektor
Copy link

@sean-mcmanus : Is "find all references" now supported ?

I am using VS code version 1.27.2 and the C/C++ IntelliSense extension.

@sean-mcmanus
Copy link
Contributor

@princehektor No, it's not supported yet. Find all references is being tracked at #15 . We're working on some of the pre-requisite implementation.

@lifuguan
Copy link

lifuguan commented Oct 25, 2018

My VSCode also cannot display the reference! And I have no idea about it.
the message is: cannot find the reference of "ledName"
image

@sean-mcmanus
Copy link
Contributor

@lifuguan Our C/C++ extension doesn't not currently expose a Find All References command, so it must be coming from another extension.

@mikedoan
Copy link

Just updated november version. The hotkey combination (shfit+fn+option+F12) is working but using mouse/click is not working.
it happened on macbook.

@metal4people-zz
Copy link

Have the same version on ubuntu 16.04 and windows:

Version: 1.30.1 (user setup)
Commit: dea8705087adb1b5e5ae1d9123278e178656186a
Date: 2018-12-18T18:12:07.165Z
Electron: 2.0.12

"Find all references" feature is present on windows, but doesn't work.
Absent on linux at all.

In my opinion this is basic code browsing feature.
It is supported by ancient cscope plugin for vim.
I don't get how do you guys prioritize the features for the IDE.

What should I do to make this feature released?

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Jan 8, 2019

@metal4people We have not shipped Find All References yet, see #15 , so I'm not sure why you think it's present on Windows -- I assume from another extension. It is a feature near the top of our priorities, but we still have (lots of) users having problems configuring IntelliSense so we might make more fixes in that area first.

@sean-mcmanus
Copy link
Contributor

Find All References is available in 0.25.0-insiders: https://github.com/microsoft/vscode-cpptools/releases/tag/0.25.0-insiders , but you'll need to set the C_Cpp.experimentalFeatures setting to "Enabled".

@mkitby
Copy link

mkitby commented Aug 22, 2019

I want to disable the find all references feature in cpptools, how to do that?

@bobbrow
Copy link
Member

bobbrow commented Aug 22, 2019

There is no way to do that. Why do you want to disable it? You don't have to use the feature if you don't want to.

@sean-mcmanus
Copy link
Contributor

@mkitby Are you using another extensions as a references provider, but still using our extension for other stuff? Is setting C_Cpp.intelliSenseEngine to "Disabled" insufficient?

@baiwfg2
Copy link

baiwfg2 commented Oct 18, 2019

I found version 1.36.1 on mac had already support find all references functionality. Good !

image

@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests