user-0 提问: vc++6.0不可以跟踪静态变量的值吗？

回复:
user: user-1
content: 跟踪静态变量所在内存地址处的值（必要时指定类型）即可。 Viewing the Value of a Variable or Contents of a Register Home Page (Debugger) |  Overview |  How Do I... Topics   What do you want to do? View the value of a variable or expression or the contents of a register  View the value of a variable using QuickWatch   View a the value of a variable or expression or the contents of a register in the Watch window   View type information for a variable in the Watch window  View a variable in the Variables window   View type information for a variable in the Variables window   Display meaningful values for your custom data type?  To view the value of a variable or expression or contents of a register   Wait for the debugger to stop at a breakpoint. – or –  Click Break on the Debug menu to halt the debugger.  On the Debug menu, click QuickWatch.   Type or paste the variable or register name or an expression into the Expression text box, and click Recalculate.   Click Close.  Tip   The Expression drop-down list box contains the most recently used QuickWatch expressions.  To view the value of a variable using QuickWatch   When the debugger is stopped at a breakpoint, switch to a source window, and click the right mouse button on a variable (Var, for example).   On the shortcut menu, click QuickWatch Var.   Click Close.  To view the value of a variable or expression or the contents of a register in the Watch window   Start debugging, and pause the debugger in break mode (program is waiting for user input after completing a debugging command).    On the View menu, click Debug Windows, then click Watch.   Select a tab for the variable or expression.   Type, paste, or drag the variable or register name or an expression into the Name column on the tab. Press ENTER (if typing).   The Watch window evaluates the variable or expression immediately and displays the value or an error message.  If you add an array or object variable to the Watch window, plus sign (+) or minus sign (–) boxes appear in the Name column. Use these boxes to expand or collapse your view of the variable described in Spreadsheet Fields.  Change the Watch window display format (to display Unicode characters, for example) using formatting symbols, described in Symbols for Watch Variables.  To view type information for a variable in the Watch window   In the Watch window, select the line containing the variable whose type you want to see.   On the View menu, click Properties.  To view a variable in the Variables window   Start debugging, and pause the debugger in break mode (program is waiting for user input after completing a debugging command).    On the View menu, click Debug Windows, then click Variables.   Click the Auto tab, Locals tab, or This tab, according to the type of variables you want to see.  To view type information for a variable in the Variables window   In the Variables window, click the Auto tab, Locals tab, or This tab.   Select the line containing the variable whose type you want to see. On the View menu, click Properties.  To display meaningful values for a custom datatype  The file autoexp.dat controls how the debugger displays data types in windows, Quickwatch, and DataTips. You can modify this file to add meaningful displays for your own datatypes. For details, see the autoexp.dat file itself (located in the /bin directory).

user: user-0
content: 好像只有设置临时变量来查看值是比较可行的。

user: user-2
content: http://bbs.csdn.net/topics/330181032  额。 这个帖子也是这个。 但是没有好的结果

user: user-3
content: 我的居然也不可以， 那就设置一个临时变量存储b的值，观察临时变量吧 static int i=1;i++ ;int temp=i;//跟踪temp

user: user-1
content: 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.