抓狂!关于调试问题,如何添加数据断点。

leonatcs 2005-04-08 12:36:50
我想监视一个变量(RadioGroup1->ItemIndex)何时被改变,
可是为什么我永远也不能选Run|Add Breakpoint|Data Breakpoint呢?
用Run|Add Watch 把RadioGroup1->ItemIndex加进去也说process not accessible.
...全文
266 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
leonatcs 2005-04-11
  • 打赏
  • 举报
回复
of no use.




自己搞清楚了,要先设置普通的source break;
然后右键选Debug|add Watch at Cursor。
当程序执行到普通断点暂停时才可以在Watch List里右键选择
break when changed。

不过缺点是太繁琐,而且一次执行完毕后下次还要依样进行,
不知有没有简单点的办法。
scanmaymaymay 2005-04-11
  • 打赏
  • 举报
回复
还没静态打包的应该很方便啊,不需要这么麻烦吧
我不懂电脑 2005-04-08
  • 打赏
  • 举报
回复
Use the Add Data Breakpoint dialog box to set a breakpoint on a specific address that halts execution when that address is written to. The breakpoint appears in the Breakpoint List, and, if there is a watch set in the watch view, the item will appear in red.

A data breakpoint is only valid for the current debug session. On the next debug session you must go to the Breakpoint view (Breakpoint List) and re-enable the data breakpoint. You can also reselect Break When Changed from the Watch view (Watch List).

Address

Specifies the address for the data breakpoint. Enter the variable name or address for the data breakpoint. When the address (up to the specified length) is written to, the program execution halts. Valid data names may be entered. For example, if you have an Integer variable X, you can enter X as the address.

Length

Specifies the length of the data breakpoint, beginning at 揂ddress? This is automatically calculated for standard data types.

Condition

Specifies a conditional expression that is evaluated each time the breakpoint is encountered. Program execution stops when the expression evaluates to true. Enter a conditional expression to stop program execution.

You can enter any valid language expression. However, all symbols in the expression must be accessible from the breakpoint's location, and the expression cannot contain function calls.

Pass count

Stops program execution at a certain line number after a specified number of passes. Enter the number of passes.

The debugger increments the pass count each time the line containing the breakpoint is encountered. When the pass count equals the specified number, the debugger pauses program execution. For example, if the pass count is set to 3, you will see 0 of 3, 1 of 3, 2 of 3, then 3 of 3 in the pass count. Program execution stops at 3 of 3.

Because the debugger increments the count with each pass, you can use them to determine which iteration of a loop fails. Set the pass count to the maximum loop count and run your program. When the program fails, you can calculate the number of loop iterations by examining the number of passes that occurred.

When you use pass counts with conditions, program execution pauses the nth time that the conditional expression is true. the debugger decrements the pass count only when the conditional expression is true.

Group

When setting a breakpoint using one of the Breakpoint Properties dialogs, you make it a member of a group by entering a group name in the Group field. See Organizing breakpoints into groups. Once your breakpoints are organized into groups, you can disable and enable groups of breakpoints by using the Disable Group and the Enable Group commands on the Breakpoint List context menu (right-click on the Breakpoint List).

Advanced button

Click the Advanced button if you want to associate actions with breakpoints: Enter the appropriate text in each field for each action you want to associate with the breakpoint.

Action Description
Break When checked, halts execution; the traditional and default action of a breakpoint.
Ignore subsequent exceptions When checked, ignore all subsequent exceptions raised by the current process during the current debug session (the debugger will not stop on any exception). Use this with "Handle subsequent exceptions" as a pair. You can surround specific blocks of code with the Ignore/Handle pair to skip any exceptions which occur in that block of code.
Handle subsequent exceptions When checked, handle all subsequent exceptions raised by the current process during the current debug session (the debugger will stop on exceptions based on the current exception settings in the Tools|Debugger options (Language and OS exception pages). This action does not mean stop on all exceptions no matter what. Use it to turn on normal exception behavior after another breakpoint disabled normal behavior using the Ignore subsequent exceptions option.
Eval expression Evaluates the specified expression and because Log result is checked by default writes the result of the evaluation to the event log. Uncheck Log result to evaluate without logging.
Log result Becomes enabled when text is entered into Eval expression and is checked by default. If checked, writes the result of the evaluation in the Eval expression to the event log. If unchecked the evaluation is not logged.
Log result If checked, writes the result of the evalution (specified in Eval expression) to the event log.
Enable group Enables all breakpoints which are members of the specified group. Select the group name. See Organizing breakpoints into groups.
Disable group Disables all breakpoints which are members of the specified group. Select the group name. See Organizing breakpoints into groups.

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧