Timothy Chung
Timothy Chung

Reputation: 153

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.

Upvotes: 15

Views: 12649

Answers (4)

softarn
softarn

Reputation: 5497

On method declaration: Ctrl+K, Ctrl+T

Upvotes: 8

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99720

Use NDepend. It comes with a VS add-in that allows you to do CQL queries on the fly. See this screenshot.

Upvotes: 1

grepsedawk
grepsedawk

Reputation: 6059

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.

Upvotes: 12

Mr Fooz
Mr Fooz

Reputation: 111856

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

Upvotes: 28

Related Questions