views:

470

answers:

4

Hi all,

I am wondering if there is anyway to list all the calls to a function in source code level so that I can see the dependency 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.

Thank you very much.

Cheers, Timothy

+10  A: 

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

Mr Fooz
Thank you very much. :-)
Timothy Chung
+2  A: 

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.

grepsedawk
This is the crudest, grungiest tip I've ever heard! But it speaks to blood lost trying any other way. I love it!
rp
I think I got this tip from Martin Fowlers Refactoring book, if you were curious :)
grepsedawk
creative one :-)
Timothy Chung
A: 

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

Mauricio Scheffer
Of course this only works for .NET code and not unmanaged C++ code
grepsedawk
A: 

use understand for c++