Visual Studio Code version 1.27.2
Find all References
only list references in the current file
. I need to find all references across files in a project.
Is it possible ?
Something like find usages
If you right click a symbol
and select "find usages". If the current symbol is a function
, then "find usages" searches for all places where this function is called. If the current symbol is a variable
, then "find usages" searches for all places where this variable is used etc etc.
The Find All References command is available on the context (right-click) menu of the element you want to find references to. Or, if you are a keyboard user, press Shift + F12.
To perform a search across all your open files, use the following shortcuts. For Mac use “Command + Shift + F”. For Windows and all other operating systems use “Ctrl + Shift + F”.
Advanced features such as Find all references
are implemented by each language extension.
For JavaScript, try creating a jsconfig.json
at the root of your workspace with the contents:
{ "compilerOptions": { "target": "ES6" }, "exclude": [ "node_modules", "**/node_modules/*" ] }
This file tells VS Code to treat all JS files in your workspace as part of the same javascript project. Find all references
still may not work properly in JavaScript if your code is too dynamic. It works best against modern js that uses import
/export
, class
, and friends
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With