When debugging my C#, I often want to know when a variable's value changes and then investigate the state of the program.
Currently, I do it like this:
However, the number of F10s required is annoying.
Surely this has been automated, I thought. But I cannot find this feature in my Microsoft Visual C# Express, which surprises me. After all, the Watch-list does automatically highlight changed values in bright red.
Am I missing something?
Simple trick for Express edition:
private string myValue;
public string MyValue
{
set
{
if (this.myValue != value) Debugger.Break();
this.myValue = value;
}
}