Can you step into specific properties in VS 2010?
Posted
by cyclotis04
on Stack Overflow
See other posts from Stack Overflow
or by cyclotis04
Published on 2010-05-25T19:15:06Z
Indexed on
2010/05/25
19:31 UTC
Read the original article
Hit count: 191
I know that you can either step into every property or not step into every property, but I would really like to be able to step into a specific property, and not the rest. Is this possible? (I also know I can use keyboard commands, but I'm asking if there's a more permanent solution.) I have a lot of properties and my setters do important things, so it's silly to step over them, but most of my getters are pointless. I'm looking for something like:
public string ImportantProperty
{
get { return _importantProperty; }
[DebuggerStepThrough(false)]
set
{
if (this.State != ConnectionState.Closed)
throw new InvalidOperationException(
"Important Property cannot be changed unless This is closed.");
if (ImportantProperty == value)
return;
_importantProperty = value;
OnImportantPropertyChanged(new EventArgs());
}
}
Unfortunately, I can't find anything that will act like [DebuggerStepThrough(false)]
and I must resort to turning off property step-over and putting [DebuggerStepThrough]
everywhere I don't want to step-through.
© Stack Overflow or respective owner