The Watch Expressions command shows a variable's name and value in the Watch window. It updates the display whenever the variable's value changes. This feature is useful during debugging to check the accuracy of a value. You can enter expressions as well as variables.
·To add a watch variable:
1.In the GENERIC program, select the wc variable in the InitProgram function.
2.From the Debug menu, choose Watch Expression. The selected wc variable appears in the Watch Expression text box.
3.Choose Add.
4.Choose Close.
5.From the Window menu, choose Watch and resize the window so it is visible with the source window displayed.
6.With the breakpoint in the GENERIC program still in place, choose Go from the Run menu. The wc variable appears in the Watch window.
·To remove the wc variable from the Watch Expression list:
1.From the Debug menu, choose Watch Expression.
2.Select wc from the Watch Expression list.
3.Choose Delete.
4.Choose Close.