你可以进入特定的属性在VS 2010中? [英] Can you step into specific properties in VS 2010?
问题描述
我知道,你可以走进每一个属性或不踏进每个属性,但我真的希望能够步入一个特定的属性,而不是休息。这可能吗? (我也知道我可以使用键盘命令,但我问,如果有一个长期的解决办法。)我有很多的属性,我的setter方法做重要的事情,所以这是愚蠢跨过他们,但我的大部分吸气剂无意义。我在寻找这样的:
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());
}
}
不幸的是,我无法找到任何东西,会像 [DebuggerStepThrough(假)]
,我必须采取的关闭财产步过,并把 [DebuggerStepThrough]
无处不在的我不想步通过。
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.
推荐答案
你为什么不把感兴趣的属性制定者断点只和preSS F5运行,直到下一个断点?
Why don't you put breakpoints in properties' setters of interest only and press F5 to run till the next breakpoint?
你为什么不一步了不重要的性质-at由pressing SHIFT + F11设置他们 - ?
Why don't you step-over unimportant properties -at setting them- by pressing shift+F11?
这篇关于你可以进入特定的属性在VS 2010中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!