Causing VS2010 debugger to break when Debug.Assert fails

后端 未结 7 2105
南笙
南笙 2020-12-15 09:15

Is there any way to cause Visual Studio 2010 to break while debugging when the argument of Debug.Assert evaluates to false?

Example: in my

7条回答
  •  -上瘾入骨i
    2020-12-15 09:48

    You can use condition breakpoint for this sort of behavior, just set a breakpoint on a line on which you want to break and then right click on the point at the left and choose condition, in popup enter desired condition (in your case is double.IsInfinity(x))

提交回复
热议问题