断点知识



Setting a Breakpoint When a Variable Changes Value
To set a breakpoint when a variable changes value
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the name of the variable.
4. Click OK to set the breakpoint.
Setting a Breakpoint When an Expression Changes Value
To set a breakpoint when an expression changes value
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type an expression such as x+y.
4. Click OK to set the breakpoint.
Setting a Breakpoint When an Expression Is True
To set a breakpoint when an expression is true
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type an expression, such as x==3, that evaluates to true or false.
4. Click OK to set the breakpoint.
Setting a Breakpoint on a Variable Outside the Current Scope
To break on a variable outside the current scope
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the variable name.
4. Select the drop-down arrow to the right of the text box.
5. From the menu that appears, click Advanced.
The Advanced Breakpoint dialog box appears.
6. In the Expression text box, type the function name and (if necessary) the filename of the variable.
7. Click OK to close the Advanced Breakpoint dialog box.
The information that you specified appears in the Expression text box in the Breakpoints dialog box.
8. In the Breakpoints dialog box, click OK to set the breakpoint.
Note   You can enter context information directly into the Expression field, using the advanced breakpoints syntax. For details, see Using Advanced Breakpoint Syntax.
Setting a Breakpoint When the Initial Element of an Array Changes Value
To break when the initial element of an array changes value
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the first element of the array (myArray[0], for example).
4. In the Number Of Elements text box on the Data tab, type 1.
5. Click OK to set the breakpoint on myArray [0].
Setting a Breakpoint When the Initial Element of an Array Has a Specific Value
To break when the initial element of an array has a specific value
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type an expression containing the initial element of the array (myArray[0]==1, for example).
4. In the Number Of Elements text box, type 1.
5. Click OK to set the breakpoint on myArray [0].
Setting a Breakpoint When a Particular Element of an Array Changes Value
To break when a particular element of an array changes value
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the element of the array (myArray[12], for example).
4. In the Number Of Elements text box, type 1.
5. Click OK to set the breakpoint on myArray [12].
Setting a Breakpoint When Any Element of an Array Changes Value
To break when any element of an array changes value
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the first element of the array (myArray[0]).
4. In the Number Of Elements text box, type the number of elements in the array.
5. Click OK to set the breakpoint on myArray.
Setting a Breakpoint When Any of the First n Elements of an Array Change Value
To break when any of the first n elements of an array change value
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the first element of the array (myArray[0], for example).
4. In the Number Of Elements text box, type n (for example, 10).
5. Click OK to set the breakpoint on myArray[0] through myArray[9].
Setting a Breakpoint When the Location Value of a Pointer Changes
To break when the location value of a pointer changes
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the pointer variable name (p, for example).
4. Click OK to set the breakpoint.
Setting a Breakpoint When the Value at a Location Pointed to Changes
To break when the value at a location pointed to changes
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the dereferenced pointer variable name (*p or p->next, for example).
4. Click OK to set the breakpoint.
Setting a Breakpoint When an Array Pointed to by a Pointer Changes
To break when an array pointed to by a pointer changes
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the dereferenced pointer variable name (*p, for example).
4. In the Number Of Elements text box, type the length of the array in elements. For example, if the pointer is a pointer to double, and the array pointed to contains 100 values of type double, type 100.
5. Click OK to set the breakpoint.
Setting a Breakpoint When the Value at a Specified Memory Address Changes
To break when the value at a specified memory address changes
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type the memory address for the byte.
For a word or doubleword memory address, enclose the address in parentheses, and precede it with a cast operator. For example, WO(21406036) for the word at memory location 21406036. Use the cast operator BY for a byte (optional), WO for a word, or DW for a doubleword. (The debugger interprets all integer constants as decimal unless they begin with zero (0) for octal or zero and x (0x) for hexadecimal.)
4. In the Number Of Elements text box, type the number of bytes, words, or doublewords to monitor. If you used the BY operator in the Expression field, specify the number of bytes. If you used WO, specify the number of words. If you used DW, specify the number of doublewords.
5. Click OK to set the breakpoint.
Setting a Breakpoint When a Register Changes
To break when a register changes
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type a register mnemonic, such as CS.
4. In the Number Of Elements text box, type the number of bytes to monitor.
5. Click OK to set the breakpoint.
Setting a Breakpoint When a Register Expression Is True
To break when a register expression is true
1. From the Edit menu, click Breakpoints.
2. Click the Data tab of the Breakpoints dialog box.
3. In the Expression text box, type an expression that contains a boolean comparison operator, such as CS==0.
4. In the Number Of Elements text box, type the number of bytes to monitor.
5. Click OK to set the breakpoint.
Note   When you set a data breakpoint, the debugger places the variable or variables used into a special debug register, if possible. The number of debug registers is limited. (Intel 80386 and later CPUs provide four debug registers. Motorola 680X0 and PowerPC chips have no debug registers.) Furthermore, stacked-based variables (parameters) cannot be placed into debug registers. If a breakpoint variable cannot be placed into a debug register, the debugger must examine the variable's memory location after every instruction to determine whether the contents have changed. These extra memory accesses reduce execution speed of the program with the debugger. In some cases, the program may appear to hang. Performance may be especially slow if you are debugging a remote application.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
项目:使用AngularJs编写的简单 益智游戏(附源代码)  这是一个简单的 javascript 项目。这是一个拼图游戏,也包含一个填字游戏。这个游戏玩起来很棒。有两个不同的版本可以玩这个游戏。你也可以玩填字游戏。 关于游戏 这款游戏的玩法很简单。如上所述,它包含拼图和填字游戏。您可以通过移动图像来玩滑动拼图。您还可以选择要在滑动面板中拥有的列数和网格数。 另一个是填字游戏。在这里你只需要找到浏览器左侧提到的那些单词。 要运行此游戏,您需要在系统上安装浏览器。下载并在代码编辑器中打开此项目。然后有一个 index.html 文件可供您修改。在命令提示符中运行该文件,或者您可以直接运行索引文件。使用 Google Chrome 或 FireFox 可获得更好的用户体验。此外,这是一款多人游戏,双方玩家都是人类。 这个游戏包含很多 JavaScript 验证。这个游戏很有趣,如果你能用一点 CSS 修改它,那就更好了。 总的来说,这个项目使用了很多 javascript 和 javascript 库。如果你可以添加一些具有不同颜色选项的级别,那么你一定可以利用其库来提高你的 javascript 技能。 演示: 该项目为国外大神项目,可以作为毕业设计的项目,也可以作为大作业项目,不用担心代码重复,设计重复等,如果需要对项目进行修改,需要具备一定基础知识。 注意:如果装有360等杀毒软件,可能会出现误报的情况,源码本身并无病毒,使用源码时可以关闭360,或者添加信任。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值