使用条件断点 [英] Use Condition Breakpoint

查看:109
本文介绍了使用条件断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
我想使用条件断点来停止调试.
我有一个类型化的DataSet和DataTable,其中包含一个名称为Url
的列 现在,当我的数据表网址列包含例如以下内容的网址时,我想停止调试:

Hi .
i want use condition breakpoint to stop debugging.
i have a typed DataSet and DataTable which contains a column that Its name is Url
now i want to stop debugging when my datatable url column has url that contain for example :

www.yahoo.com


我该怎么办?


what i do ?

推荐答案


右键单击断点,然后在快捷菜单上单击条件".
祝你好运
hey
right-click on breakpoint and then click Condition on the shortcut menu.
best luck


亲爱的朋友,

指定断点条件:-

1).在断点"窗口中,右键单击包含断点字形的行,然后在快捷菜单上单击条件".

-或-

在源,反汇编或调用堆栈中,右键单击包含断点字形的行,然后在快捷菜单上单击断点条件".

2).在断点条件"对话框中,在条件"框中输入有效的表达式,例如myLocalVariable> 1.有关有效表达式的更多信息,请请参阅调试器中的表达式.
[^ ]
3).如果要在表达式满足时中断,请选择是";如果要在表达式值更改时中断,请选择已更改".


注意

在第一次到达断点之前,调试器不会对表达式求值.如果为本地代码选择已更改",则调试器不会将条件的第一个评估视为更改,因此在表达式的第一个评估中不会出现断点.如果为托管代码选择已更改",则在选择已更改"后,将在第一个评估中找到断点.


希望这对您有所帮助.

谢谢
Dear Friend,

To specify a breakpoint condition:-

1). In the Breakpoints window, right-click the line that contains a breakpoint glyph, and then click Condition on the shortcut menu.

-or-

In a source, Disassembly, or Call Stack, right-click a line that contains a breakpoint glyph, and then click Condition from Breakpoints on the shortcut menu.

2). In the Breakpoint Condition dialog box, enter a valid expression in the Condition box, such as myLocalVariable > 1. For more information about valid expressions, see Expressions in the Debugger.
[^]
3). Choose Is true if you want to break when the expression is satisfied, or choose Has changed if you want to break when the value of the expression has changed.


Note

The debugger does not evaluate the expression until the first time the breakpoint is reached. If you choose Has changed for native code, the debugger does not consider the first evaluation of the condition to be a change, so the breakpoint will not be hit on the first evaluation of the expression. If you choose Has changed for managed code, the breakpoint is hit on the first evaluation after Has changed is selected.


Hope this will help you out.

Thanks


这篇关于使用条件断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆