I have a class representing the current settings of the software that I’m developing and what I’d like to do is to get the values of all properties and fields in an instance of that class during a debug breakpoint. I know you can hover on the instance and get that information, but I can’t find a way to dump it to a file or see it in a separate window. Is there a way to do it in Visual Studio 2010? (I’m using C#.)
I have a class representing the current settings of the software that I’m developing
Share
There are several ways to do this.
1.) open your locals window and you maybe able to see the variable there. If it is nested in some other object you will need to expand the variable to see it.
2.) you could open a watch window and put the variable in there to see its contents.
3.) you could use the immediate window and execute a Trace.Writeline(…) of the variable to see it in the output.