【发布时间】:2014-07-04 11:42:30
【问题描述】:
我使用了命中断点条件
(new System.Diagnostics.StackTrace(true).GetFrame(2) != null
&& new System.Diagnostics.StackTrace(true).GetFrame(2).GetMethod().Name
== "UpdateFromLocationInfo")
当我“逐步”点击这个断点时,我通过快速观察检查了这个条件,这是真的。但条件不适用于 f5 模式
【问题讨论】:
-
作为一种解决方法,您可以将其放入 if 语句中,然后在 if 语句中放置一个非条件断点。显然,您希望在完成调试后恢复它
-
我不需要使用额外的代码。我只想用Visual Studio Instrument:
right click onto breakpoint, then choose "Condition..." in popup window -
我明白了。如果您无法按照您尝试的方式工作,我会告诉您一种解决方法
-
@BenAaronson 谢谢!但这不适合我的情况
标签: c# .net visual-studio visual-studio-2013