question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Find usages (find all file references / find all folder references)

See original GitHub issue

If you search the issues here on GitHub and on StackOverflow, you’ll find that there is a ton of fragmentation around this feature for a few reasons:

  • Everyone is referring to different subsets of the feature
  • Everyone is calling it by different names (users coming from WebStorm will refer to it as “Find Usages”)
  • VSCode actually already has this partially implemented, but it’s hidden and not documented well.

This feature refers to three subsets of finding references:

1. Find all references of a symbol

VSCode has this already.

2. Find all references of a file

VSCode has this already, but few know about it, and the process for getting to it is unnecessary. Currently you need to use the “find all references” command on an import path that includes the file.

This is a very useful feature, and should be made available in the file explorer, for a file’s context menu when right clicking it, as explained here. Additionally, there should be a command, References: Find All References of File as explained here.

3. Find all references of a folder

VSCode does not yet have this feature. When using this on a folder (made available in the context menu), it should show the references for all files inside that folder. A command might be useful here as well (References: Find All References of Folder).

Note:

I’ve already submitted a feature request mentioning this in the past, which was closed and suggested as an extension. However, it looks like I wasn’t clear on what my request was, because VSCode has since implemented a lot of this functionality. And it’s also clear that there’s a lot of confusion around this among VSCode users.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:45
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

52reactions
askhogancommented, Jul 5, 2019

This is the single biggest disappointment coming from WebStorm. VSCode wins in so many ways. The two areas that cause weekly pain are:

  1. Lack of ability to Find Usages of file, which is essential when refactoring or renaming or organizing folder structure.
  2. Lack of ability to rename a file and have the editor automatically change the references to the renamed file.
3reactions
baoanhngcommented, Mar 15, 2020

Finally in the backlog, which will take like 2 years or more. But at least there’s a milestone.

I can’t believe people can keep using VSCode without a proper “find usages”. It is the only reason I still stick with Sublime Text. For me as a PHP developer, there’s no way you can deal with non-namespace, autoloaded methods and functions without find usages.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Find All References" across files for a method/function in ...
Find all References only list references in the current file . I need to find all references across files in a project. Is...
Read more >
Search for usages | IntelliJ IDEA Documentation - JetBrains
With the Find Usages actions you can search for the references of your code ... IDEA automatically highlights all found usages in the...
Read more >
Visual studio code - find all references - Super User
In summary, you need to install the Microsoft C/C++ Extension and GNU Global and run gtags on your workspace folder. You can see...
Read more >
How To Use Find and Locate to Search for Files on Linux
This syntax will return every file on the system that was created or changed more recently than the reference file. Finding by Owner...
Read more >
Find Files in Linux Using the Command Line | Linode
You can use the find command to search for a file or directory on your file system. By using the -exec flag (...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found