Skip to content

"Find all references" Not working #404

Closed

Description

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.

Activity

  1. sean-mcmanus commented on Dec 12, 2016

    @sean-mcmanus
    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.

  2. dfroze commented on Dec 15, 2016

    @dfroze

    Hy Sean McManus (@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

  3. sean-mcmanus commented on Dec 15, 2016

    @sean-mcmanus
    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.

  4. dfroze commented on Dec 15, 2016

    @dfroze

    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.

  5. BillDenton commented on Jan 4, 2017

    @BillDenton

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

  6. BillDenton commented on Jan 4, 2017

    @BillDenton

    Also seems to be the same as #361

  7. eddy-geek commented on Mar 14, 2017

    @eddy-geek

    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++.

  8. bobbrow commented on Mar 14, 2017

    @bobbrow
    Contributor

    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.

  9. bobbrow commented on Mar 14, 2017

    @bobbrow
    Contributor

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

  10. dalbert2 commented on Jul 20, 2018

    @dalbert2

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

  11. princehektor commented on Oct 10, 2018

    @princehektor

    Sean McManus (@sean-mcmanus) : Is "find all references" now supported ?

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

  12. sean-mcmanus commented on Oct 10, 2018

    @sean-mcmanus
    Contributor

    amadhus (@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.

  13. lifuguan commented on Oct 25, 2018

    @lifuguan

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

  14. sean-mcmanus commented on Oct 25, 2018

    @sean-mcmanus
    Contributor

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

  15. mikedoan commented on Dec 14, 2018

    @mikedoan

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

  16. metal4people-zz commented on Jan 8, 2019

    @metal4people-zz

    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?

  17. sean-mcmanus commented on Jan 8, 2019

    @sean-mcmanus
    Contributor

    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.

  18. sean-mcmanus commented on Aug 9, 2019

    @sean-mcmanus
    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".

  19. mkitby commented on Aug 22, 2019

    @mkitby

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

  20. bobbrow commented on Aug 22, 2019

    @bobbrow
    Contributor

    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.

  21. sean-mcmanus commented on Aug 22, 2019

    @sean-mcmanus
    Contributor

    Leo Cheng (@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?

  22. baiwfg2 commented on Oct 18, 2019

    @baiwfg2

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

    image

  23. locked and limited conversation to collaborators on Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions