我想在短时间内暂时禁用断点,因此我将条件断点设置为以下条件:
(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.
为什么运行时拒绝对表达式求值?
如何在不修改调试源代码的情况下获得所需的行为?
从VS2012开始,您必须切换到托管兼容模式才能使用条件断点。为什么(对不起,由于该链接已断开,所以不再需要来自MS的原因。我将链接添加到archive.org),并在此处进行了说明:
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句