Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio - show all calls to a function in source code level

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.

like image 351
Timothy Chung Avatar asked Dec 03 '08 02:12

Timothy Chung


People also ask

How can I see the call hierarchy code in Visual Studio?

To display the Call Hierarchy window, right-click in the code editor on the name of a method, property, or constructor call, and then select View Call Hierarchy.

How do I view all methods in a class in Visual Studio?

In Visual Studio 2015, View > Other Windows > Resource View. The keyboard shortcut is Ctrl + Shift + E . I find this cleaner than Class View. With Class View Windows you can filter methods/attributes based on access modifier (private/protected/public) etc.

What is call hierarchy in Visual Studio?

Call Hierarchy option in Visual Studio 2010 helps you to navigate through your code by displaying all calls to and from a selected method or property. This represents a visualize version of Calling Methods or call from a method.

How do you read a call stack?

Call stack is set of lines, which is usually read from top to bottom - meaning moving from current locations to callers. The bottom line was executed first. The top line is executed last and it is the current routine.


1 Answers

Right-click on the call and select "Find All References".

like image 66
Mr Fooz Avatar answered Sep 20 '22 13:09

Mr Fooz