Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding all the places a variable has been set?

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?

like image 813
GurdeepS Avatar asked Aug 21 '10 23:08

GurdeepS


1 Answers

For what it's worth, this will finally be natively supported in VS2019.

Specifically the 'Find All References' window has a new 'Kind' column which can be filtered for 'Write' references:

enter image description here

The specific GitHub PR that added this feature is scheduled to be included in Visual Studio 2019 Preview 2 (16.0.P2) https://github.com/dotnet/roslyn/issues/22545

The full release of VS2019 is roadmapped for Q1 of 2019.

like image 154
Johannes Avatar answered Nov 04 '22 21:11

Johannes