vc++6.0不可以跟踪静态变量的值吗?我想跟踪f()的静态变量的a,b的值,但是右边的变量查看窗口一直显示a,b是
vc++6.0不可以跟踪静态变量的值吗?
我想跟踪f()的静态变量的a,b的值,但是右边的变量查看窗口一直显示a,b是错误的标识符。
[解决办法]To break when the value at a specified memory address changes
From the Edit menu, click Breakpoints.
Click the Data tab of the Breakpoints dialog box.
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.)
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.
Click OK to set the breakpoint.
[解决办法]我的居然也不可以,
那就设置一个临时变量存储b的值,观察临时变量吧
static int i=1;i++ ;int temp=i;//跟踪temp
[解决办法]http://bbs.csdn.net/topics/330181032 额。 这个帖子也是这个。 但是没有好的结果