Saving and restoring Watch Window contents: Difference between revisions
(Created page with "__TOC__ <span class="f_Para">If you anticipate watching the same or many of the same items in subsequent debugging sessions, you can save to a local file the entire list of it...") |
No edit summary |
||
Line 7: | Line 7: | ||
# Specify a workstation folder location and a name for the storage file. | # Specify a workstation folder location and a name for the storage file. | ||
: The list of watched items (only) is stored in a text file with a </span><span class="term">.watch </span><span class="f_ListContinue">file name extension</span><span class="f_Monospace">:</span><span class="f_ListContinue"> </span> | : The list of watched items (only) is stored in a text file with a </span><span class="term">.watch </span><span class="f_ListContinue">file name extension</span><span class="f_Monospace">:</span><span class="f_ListContinue"> </span> | ||
: [[File:watchsaved1_zoom60.gif|239x116px|watchSaved1]]<span class="f_ListContinue"> </span> | |||
[[File:watchsaved1_zoom60.gif|239x116px|watchSaved1]]<span class="f_ListContinue"> </span> | |||
<span class="f_Para">Alternatively, you can run the </span><span class="f_Monospace">[[saveWatch command|saveWatch]]</span><span class="f_Para"> command from a [[Introducing the configurable components|mapped]] Client button, key, or macro that has the same effect as the above two steps.</span> | <span class="f_Para">Alternatively, you can run the </span><span class="f_Monospace">[[saveWatch command|saveWatch]]</span><span class="f_Para"> command from a [[Introducing the configurable components|mapped]] Client button, key, or macro that has the same effect as the above two steps.</span> |
Latest revision as of 22:47, 21 April 2023
If you anticipate watching the same or many of the same items in subsequent debugging sessions, you can save to a local file the entire list of items displayed in the Watch Window, then restore those items to the Watch Window whenever you want. This may significantly minimize the effort of repopulating the Watch Window.
For example, say you are watching the function specifications $LISTCNT(%G), $LISTINF(%G, 1), $LISTINF(%G, 2), and $LISTINF(%G, 3). To save them for later use:
- Select Save Watch from the Debugger Client File menu.
- Specify a workstation folder location and a name for the storage file.
Alternatively, you can run the saveWatch command from a mapped Client button, key, or macro that has the same effect as the above two steps.
Restoring
To restore (at any time) to the Watch Window these or other items from any .watch file (including any you create independently):
- Select Load Watch from the File menu.
- Locate and select the .watch file in the Windows Select Watch File dialog box.
- By default, the search for the .watch file begins with the folder specified in the stateFileFolder element in the debuggerConfig.xml file.
- The file's contents are added to the Watch Window display with whatever current value they may have in the current source code.
Again, as an alternative, you can run the loadWatch command from a mapped Client button, key, or macro that has the same effect as the above two steps.
You can save as many watched lists as you like.