| |||
| Home > Working with Debug Views > Working with watches > Saving watches as favorites | |||
You can create watches and then add them directly to your personal Favorites List or you can add watches that you have been using in the current debugging session. This section explains the steps to follow to do both.
To create a Watch favorite, right-click inside a blank entry of the Watch pane to display the Name menu, and then select Add from Favorites.... This displays the Favorites Chooser/Editor dialog box. If this is the first time you have used watches in RealView Debugger, the display list is empty.
To create a new watch and add it to your Favorites List:
Click New to display the New/Edit Favorite dialog box shown in Figure 6.17.
Enter the expression to be watched, for example Ptr_Comp.
Enter a short text description to help you to identify
the watch for future use, for example my watch favorite.
This is optional.
Click OK to confirm the entries and close the New/Edit Favorite dialog box.
The Favorites Chooser/Editor dialog box is displayed with the newly-created watch shown in the display list (shown in Figure 6.18). See Using the Favorites Chooser/Editor dialog box for details.
Duplicate entries are not permitted in the Favorites List.
With several watches already set, RealView Debugger lets you choose which to add to your Favorites List so that they are available for re-use in future debugging sessions or with other target configurations of your application program.
To add existing watches to your Favorites List:
Highlight an expression in the Watch pane that you want to add to your Favorites List.
Right-click on the Name and select Add
from Favorites... from the Name menu. This
displays the Favorites Chooser/Editor, shown in Figure 6.18.
The display list shows any watches already saved in your Favorites List. The data field now shows the chosen expression.
Click Add to List to add the specified expression to your Favorites List. This displays the New/Edit Favorite dialog box shown in Figure 6.19.
The Expression field contains the chosen watch and you can enter a short text description to help you identify the watch favorite. This is optional.
Click OK to confirm the watch details and close the dialog box.
The Favorites Chooser/Editor dialog box is displayed showing the new watch in the display list. Because this watch is already set, click Close to close the dialog box. If required, set another watch from your Favorites List before closing the dialog box.
The edited Favorites List is saved to your exphist.sav file
when you close RealView Debugger.
With several watches already set, you can right-click on the Value for
a specified expression and display the Value menu.
This context menu includes the option Set from Favorites... to
specify a data value to be set.
Select this option to display the Favorites Chooser/Editor dialog box where you can:
save an existing data value as an entry in your Favorites List so that it can be re-used later in this debugging session
take a data value already saved and use it to set the starting value for the specified watch.
If you are using RealView Debugger on non-Windows platforms, the history file is only created if you create and save a favorite, for example a breakpoint or watchpoint. See Appendix B RealView Debugger on Sun Solaris and Red Hat Linux for details.