Visual Studio - show all calls to a function in source code level
12,394
Solution 1
Right-click on the call and select "Find All References".
Solution 2
A brute force method is to change the name of the function and recompile and look at the errors. Sometimes I have trouble with the Find References functionality in VS.
Solution 3
On method declaration: Ctrl+K, Ctrl+T
Solution 4
Use NDepend. It comes with a VS add-in that allows you to do CQL queries on the fly. See this screenshot.
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on June 21, 2022Comments
-
Admin about 2 years
I am wondering if there is any way to list all the calls to a function in source code, so that I could see the dependencies if I modify that function.
One method I use is to search the function name in the "Entire Solution" but I am looking for a better way.