In a project I don't want to use breakpoints to view variable values so I use:
Debug.WriteLine("This is a test.", "SomeIdentifier");
Where Debug is from "System.Diagnostics" and "this is a test." is replaced with some variable value. Now when I look in the debug output window I see a very large list, I can make the list smaller by only showing ProgramOutput in this window (right click in output window -> program output). However There is still a large list while I only want to look at the value of same variable which has a specific identifier like "SomeIdentifier". I could use ctrl+f to search for the items instead of looking for them and save a bit of time but it's still not effective. for example the following situation:
Im running a large number of calls on my asp.net application for a stress test and want to see if a specific variable is valid, and only that specific variable. I just want to see a list of that value only for example.
SomeIdentifier - 1
SomeIdentifier - 2
SomeIdentifier - 3
SomeIdentifier - 4
instead of:
SomeIdentifier - 1
some other stuff some other stuff some other stuff
some other stuff some other stuff
some other stuff some other stuff
SomeIdentifier - 2
some other stuff some other stuff some other stuff
SomeIdentifier - 3
some other stuff some other stuff
some other stuff some other stuff some other stuff
some other stuff some other stuff
some other stuff
some other stuff
SomeIdentifier - 4
I could write to a log file but that sound not very efficient (need to add even more code/dependecy to log framework to log a variable). Is it possible to debug a specific variable without using breakpoints or having to search a list/create a log file?
note: im using C#