views:

37

answers:

4

Hi,

Often when developing with VS2010 Ultimate, I want to check where in a codebase a value is being set (so where this is an assignment).

Is there a way, using VS2010 Ultimate, or a 3rd party debugging tool, to be able to get all the places in a codebase where a variable has been set or got?

Thanks

+1  A: 

You can use the command "Find references" (Ctrl + K, Ctrl + R)

Ewald Hofman
A: 

As Daniel Pratt asked above, I'm not sure whether you mean properties, variables or something else. However, one related function that I use a lot is "Find Usages", which can be reached by right clicking methods, classes, members etc. That finds not only assignments, but all uses - however maybe that will narrow it down enough for you to sift through manually after the assignments.

Eldloppa
+1  A: 

Sometimes old techniques become the best. May be you can search entire solution with CTRL + Shift + F

bahadir arslan
Avatar
+1  A: 

Yes, there is the Value Origins feature that's available in Reshaper 5.

Searching the entire solution with Ctrl+Shift+F or using Find Usages as some have suggested doesn't answer OP's question - it will show every usage of the variable, not just assignments, and swifting through that list can be tedious and time consuming.

Omer Raviv