Add item to watch window: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
__TOC__
__TOC__
== Adding and removing Watch Window items ==


<span class="f_Para">You explicitly add to and remove from the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para"> the items whose values you want to view. </span>
<span class="f_Para">You explicitly add to and remove from the </span><var>Watch Window</var><span class="f_Para"> the items whose values you want to view. </span>


=== Displaying items ===
=== Displaying items ===


<span class="f_Para">These are the simplest ways to add an item to the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para">: </span>
<span class="f_Para">These are the simplest ways to add an item to the </span><var>Watch Window</var><span class="f_Para">: </span>
 
<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_ListBul1">In the </span><span class="f_GUIlabel">Source Code</span><span class="f_ListBul1"> display, right click a program line that contains variables, and select </span><span class="f_GUIlabel">Add Watch</span><span class="f_ListBul1"> from the context menu. All variables on that line are added to the </span><span class="f_GUIlabel">Watch Window</span><span class="f_ListBul1">. </span>


*<span class="f_ListBul1">In the </span><var>Source Code</var><span class="f_ListBul1"> display, right click a program line that contains variables, and select </span><var>Add Watch</var><span class="f_ListBul1"> from the context menu. All variables on that line are added to the </span><var>Watch Window</var><span class="f_ListBul1">. </span>
[[File:sourcecontext.png|439x223px|sourceContext]]<span class="f_ListContinue"> </span>
[[File:sourcecontext.png|439x223px|sourceContext]]<span class="f_ListContinue"> </span>


<span class="f_ListContinue">The </span><span class="f_Para">[[intro_configurable_components.html#ui_commands|mappable]]</span><span class="f_ListContinue"> Client command that performs the same action is </span><span class="f_Monospace">[[addwatchoncurrentline_cmd.html|addWatchOnCurrentLine.]]</span><span class="f_ListContinue"> </span>
: The <span class="f_Para">[[Introducing the configurable components|mappable]]</span><span class="f_ListContinue"> Client command that performs the same action is </span>[[AddWatchOnCurrentLine command]].


<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_Para">For the program line in the </span><span class="f_GUIlabel">Source Code</span><span class="f_Para"> display that is highlighted to indicate it is </span><span class="f_EmphItal">in the current execution position</span><span class="f_Para">, an alternative to right clicking the current line is to select </span><span class="f_GUIlabel">Add Watch on Current Line</span><span class="f_Para"> from the Client's </span><span class="f_GUIlabel">Data Display</span><span class="f_Para"> menu. </span><span class="f_ListBul1">All variables on the line are added to the </span><span class="f_GUIlabel">Watch Window.</span><span class="f_ListBul1"> </span>
*<span class="f_Para">For the program line in the </span><var>Source Code</var><span class="f_Para"> display that is highlighted to indicate it is </span><span class="term">in the current execution position</span><span class="f_Para">, an alternative to right clicking the current line is to select </span><var>Add Watch on Current Line</var><span class="f_Para"> from the Client's </span><var>Data Display</var><span class="f_Para"> menu. </span><span class="f_ListBul1">All variables on the line are added to the </span><var>Watch Window.</var><span class="f_ListBul1"> </span>


<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_ListBul1">Type the name (case is not important) of the item in the [[entity-name_input.html|Entity name input box]]</span><span class="f_Para">,</span><span class="f_ListBul1"> then click the </span><span class="f_GUIlabel">Watch</span><span class="f_ListBul1"> button (or select the </span><span class="f_GUIlabel">Data Display</span><span class="f_ListBul1"> &gt; </span><span class="f_GUIlabel">Add Watch </span><span class="f_ListBul1">menu item): </span>
*Type the name (case is not important) of the item in the [[Entity name input box]], then click the </span><var>Watch</var><span class="f_ListBul1"> button (or select the </span><var>Data Display</var><span class="f_ListBul1"> &gt; </span><var>Add Watch </var><span class="f_ListBul1">menu item): </span>


[[File:tracebut4c_zoom55.gif|258x153px|traceBut4c]]<span class="f_ListContinue"> </span>
[[File:tracebut4c_zoom55.gif|258x153px|traceBut4c]]<span class="f_ListContinue"> </span>


<span class="f_ListContinue">The mappable Client command that performs the same action is </span><span class="f_Monospace">[[addwatch_cmd.html|addWatch.]]</span><span class="f_ListContinue"> </span>
The mappable Client command that performs the same action is [[AddWatch command]].
 
<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_ListContinue">For these types of items, you must specify more than just the item name in the text box: </span>
 
<span class="f_ListSimpleList">[[watching_fields.html|Model 204 fields]] </span>


<span class="f_ListSimpleList">[[watch_global_variables.html|Global variables]]</span>
*<span class="f_ListContinue">For these types of items, you must specify more than just the item name in the text box: </span>
 
** [[Watching Model 204 fields|Model 204 fields]] 
<span class="f_ListSimpleList">[[watch_object_vars.html|Shared object variables]]</span>
** [[Watching global variables|Global variables]]  
 
** [[Watching object variables|Shared object variables]]  
<span class="f_ListSimpleList">[[watching_$lists.html|$lists]] </span>
** [[Watching $lists, Stringlists, and Arraylists|$lists]]  


=== Viewing long items ===
=== Viewing long items ===
<span class="f_Para">To display lengthy values, you can do one of the following: </span>
<span class="f_Para">To display lengthy values, you can do one of the following: </span>
 
*<span class="f_ListBul1">Expand the </span><var>Watch Window</var><span class="f_ListBul1"> by dragging its left edge to the left: </span>
<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_ListBul1">Expand the </span><span class="f_GUIlabel">Watch Window</span><span class="f_ListBul1"> by dragging its left edge to the left: </span>
 
[[File:watchwin1d_zoom55.gif|356x119px|watchWin1d]]<span class="f_ListContinue"> </span>
[[File:watchwin1d_zoom55.gif|356x119px|watchWin1d]]<span class="f_ListContinue"> </span>
*<span class="f_ListBul1">Hover your mouse over the item to display it entirely in a tooltip box: </span>
: [[File:watchwinlong1_zoom50.gif|408x97px|watchWinLong1]]
: This feature is enabled by selecting the <var>Show long watch values in a Tooltip</var> option in the Client's [[File menu options|Preferences box]] (it is off by default).


<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_ListBul1">Hover your mouse over the item to display it entirely in a tooltip box: </span>
*<span class="f_ListBul1">double click the value to [[Getting a detailed view of the value of a watched item|display it in a Value window]]. </span>
 
*<span class="f_ListBul1">Display the entire </span><var>Watch Window</var><span class="f_ListBul1"> in a [[Opening an external window|window that is external to the Client.]]</span>
<span class="f_ListContinue"> </span>[[File:watchwinlong1_zoom50.gif|408x97px|watchWinLong1]]<span class="f_ListContinue"> </span>
 
<span class="f_ListContinue">This feature is enabled by selecting the </span><span class="f_GUIlabel">Show long watch values in a Tooltip</span><span class="f_ListContinue"> option in the Client's [[file_menu_opts.html|Preferences box]] (it is off by default).</span>
 
<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_ListBul1">double click the value to [[get_detailed_view_of_watched_value.html|display it in a Value window]]. </span>
 
<span class="f_ListBul1" style="font-family: Arial,'Lucida Sans Unicode','Lucida Grande','Lucida Sans';display:inline-block;width:30px;margin-left:-30px">•</span><span class="f_ListBul1">Display the entire </span><span class="f_GUIlabel">Watch Window</span><span class="f_ListBul1"> in a [[open_external_window.html|window that is external to the Client.]]</span>


=== Removing items ===
=== Removing items ===


<span class="f_Para">To remove a single item from the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para">, right click the item and select </span><span class="f_GUIlabel">Remove</span><span class="f_Para"> from the context menu: </span>
<span class="f_Para">To remove a single item from the </span><var>Watch Window</var><span class="f_Para">, right click the item and select </span><var>Remove</var><span class="f_Para"> from the context menu: </span>


[[File:remwatch2_zoom60.gif|313x109px|remWatch2]]<span class="f_ImageCaption"> </span>
[[File:remwatch2_zoom60.gif|313x109px|remWatch2]]<span class="f_ImageCaption"> </span>
: The mappable Client command that performs the same action is <span class="f_Monospace">[[removeCurrentWatch command|removeCurrentWatch.]]</span>


<span class="f_ListContinue">The mappable Client command that performs the same action is </span><span class="f_Monospace">[[removecurrentwatch_cmd.html|removeCurrentWatch.]]</span><span class="f_Para"> </span>
<span class="f_Para">To remove all items from the </span><var>Watch Window</var><span class="f_Para">, click the </span><var>Clear Watch</var><span class="f_Para"> button, below the main window. This button empties the </span><var>Watch Window</var><span class="f_Para"> and instructs the mainframe portion of the Debugger to stop collecting any watch data. </span>
 
<span class="f_Para">To remove all items from the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para">, click the </span><span class="f_GUIlabel">Clear Watch</span><span class="f_Para"> button, below the main window. This button empties the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para"> and instructs the mainframe portion of the Debugger to stop collecting any watch data. </span>


<span class="f_Para">The mappable Client command that removes all </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para"> items is </span><span class="f_Monospace">[[client_command_ref.html|clearWatch.]]</span>
<span class="f_Para">The mappable Client command that removes all </span><var>Watch Window</var><span class="f_Para"> items is </span><span class="f_Monospace">[[Client Command Reference|clearWatch.]]</span>


<span class="f_Subhead">Redisplaying items <span id="redisplay_item" class="hmanchor"></span></span>
=== Redisplaying items ===


<span class="f_Para">Each item you add to the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para"> is also added to a drop down list you can view in the [[entity-name_input.html|Entity name input box]]</span><span class="f_ListBul1"> </span><span class="f_Para">by clicking the arrow at the right. To redisplay an item you previously removed from the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para">, simply select from the drop down list the item you want to watch again: </span>
<span class="f_Para">Each item you add to the </span><var>Watch Window</var><span class="f_Para"> is also added to a drop down list you can view in the [[Entity name input box|Entity name input box]]</span><span class="f_ListBul1"> </span><span class="f_Para">by clicking the arrow at the right. To redisplay an item you previously removed from the </span><var>Watch Window</var><span class="f_Para">, simply select from the drop down list the item you want to watch again: </span>


[[File:watchdrop2a_zoom50.gif|302x160px|watchDrop2a]]<span class="f_Para"> </span>
[[File:watchdrop2a_zoom50.gif|302x160px|watchDrop2a]]<span class="f_Para"> </span>


<span class="f_Para">The items in the drop down list persist across Debugger Client sessions. The contents of the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para"> itself are redisplayed in subsequent Client sessions </span><span class="f_EmphItal">by default</span><span class="f_Para">. If you do not want the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para"> contents to persist across Client sessions, clear the </span><span class="f_GUIlabel">Restore watches on startup</span><span class="f_Para"> checkbox accessed from the </span><span class="f_GUIlabel">Preferences</span><span class="f_Para"> option in the </span><span class="f_GUIlabel">File</span><span class="f_Para"> menu. </span>
<span class="f_Para">The items in the drop down list persist across Debugger Client sessions. The contents of the </span><var>Watch Window</var><span class="f_Para"> itself are redisplayed in subsequent Client sessions </span><span class="term">by default</span><span class="f_Para">. If you do not want the </span><var>Watch Window</var><span class="f_Para"> contents to persist across Client sessions, clear the </span><var>Restore watches on startup</var><span class="f_Para"> checkbox accessed from the </span><var>Preferences</var><span class="f_Para"> option in the </span><var>File</var><span class="f_Para"> menu. </span>


<span class="f_EndTopic"> </span>
[[Category:Debugger Home]]

Latest revision as of 15:31, 7 April 2023

Adding and removing Watch Window items

You explicitly add to and remove from the Watch Window the items whose values you want to view.

Displaying items

These are the simplest ways to add an item to the Watch Window:

  • In the Source Code display, right click a program line that contains variables, and select Add Watch from the context menu. All variables on that line are added to the Watch Window.

sourceContext

The mappable Client command that performs the same action is AddWatchOnCurrentLine command.
  • For the program line in the Source Code display that is highlighted to indicate it is in the current execution position, an alternative to right clicking the current line is to select Add Watch on Current Line from the Client's Data Display menu. All variables on the line are added to the Watch Window.
  • Type the name (case is not important) of the item in the Entity name input box, then click the Watch button (or select the Data Display > Add Watch menu item):

traceBut4c

The mappable Client command that performs the same action is AddWatch command.

Viewing long items

To display lengthy values, you can do one of the following:

  • Expand the Watch Window by dragging its left edge to the left:

watchWin1d

  • Hover your mouse over the item to display it entirely in a tooltip box:
watchWinLong1
This feature is enabled by selecting the Show long watch values in a Tooltip option in the Client's Preferences box (it is off by default).

Removing items

To remove a single item from the Watch Window, right click the item and select Remove from the context menu:

remWatch2

The mappable Client command that performs the same action is removeCurrentWatch.

To remove all items from the Watch Window, click the Clear Watch button, below the main window. This button empties the Watch Window and instructs the mainframe portion of the Debugger to stop collecting any watch data.

The mappable Client command that removes all Watch Window items is clearWatch.

Redisplaying items

Each item you add to the Watch Window is also added to a drop down list you can view in the Entity name input box by clicking the arrow at the right. To redisplay an item you previously removed from the Watch Window, simply select from the drop down list the item you want to watch again:

watchDrop2a

The items in the drop down list persist across Debugger Client sessions. The contents of the Watch Window itself are redisplayed in subsequent Client sessions by default. If you do not want the Watch Window contents to persist across Client sessions, clear the Restore watches on startup checkbox accessed from the Preferences option in the File menu.