【发布时间】:2014-03-28 09:46:46
【问题描述】:
我想在短时间内暂时禁用断点,所以我设置了一个条件断点,条件如下:
(global::System.DateTime.Now<new global::System.DateTime(2014,03,28,11,0,0))
当这个断点被命中时,会弹出一个对话框,说
The condition for a breakpoint failed to execute. The condition was
'(global::System.DateTime.Now<new
global::System.DateTime(2014,03,28,11,0,0))'. The error returned was
'The runtime has refused to evaluate the expression at this time.'. Click
OK to stop at this breakpoint.
为什么运行时拒绝计算表达式?
如何在不修改已调试源代码的情况下获得所需的行为?
【问题讨论】:
-
你想要的行为是什么?
-
@Tigran 在可调整的时间(例如午餐时间)禁用断点
标签: c# debugging visual-studio-2013 conditional-breakpoint