To print a variable or expression at the current program location, choose Print from the Debug menu. It is also by default in the tear-off region.
To display a variable or expression every time execution stops, starting at the current program location, choose Display from the Debug menu.
When you choose Print or Display, a dialog box appears; Figure 5-1 shows an example of the Print dialog box.
In the Expression box, enter the variable or expression whose value(s) you want printed. Text selected in the source window appears as the default; you can edit this text.
The dialog boxes also offer choices as to the window in which the values are to appear:
You can specify that the values are to be printed or displayed in a standard window dedicated to the specified expression. The first time you print or display the data, Prism creates this window. If you print data, and subsequently print it again, this standard window is updated. This is the default choice for both Print and Display.
You can create a separate snapshot window for printing or displaying values. This is useful if you want to compare values between windows.
You can print out the values in the command window.
Click on Print or Display to print the values of the specified expression at the current program location.
Click on Cancel or press the Esc key to close the window without printing or displaying.