Displaying temporarily the value of a program data item: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
(One intermediate revision by the same user not shown)
Line 1: Line 1:
__TOC__
__TOC__
<span class="f_Para">While the Debugger is evaluating program code in the </span><span class="f_GUIlabel">Source Code</span><span class="f_Para"> tab, you can view the value of a variable or field (one time), without adding it to the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Para"> for continuous watching. You do either of the following:</span>
<span class="f_Para">While the Debugger is evaluating program code in the </span><var>Source Code</var><span class="f_Para"> tab, you can view the value of a variable or field (one time), without adding it to the </span><var>Watch Window</var><span class="f_Para"> for continuous watching. You do either of the following:</span>


*<span class="f_ListBul1">Right click the </span><span class="f_GUIlabel">Source Code</span><span class="f_ListBul1"> line in which the variable (say, </span><span class="term">%var</span><span class="f_ListBul1">), is referenced or declared, then select the resulting &quot;Display </span><span class="term">%var</span><span class="f_ListBul1">&quot; menu option.  </span>
*<span class="f_ListBul1">Right click the </span><var>Source Code</var><span class="f_ListBul1"> line in which the variable (say, </span><span class="term">%var</span><span class="f_ListBul1">), is referenced or declared, then select the resulting &quot;Display </span><span class="term">%var</span><span class="f_ListBul1">&quot; menu option.  </span>


: Or:
: Or:


*<span class="f_ListBul1">Type its name in the </span><span class="f_Para">Entity name input</span><span class="f_ListBul1"> box below the main window; then click the </span><span class="f_GUIlabel">Value</span><span class="f_ListBul1"> button. </span>
*<span class="f_ListBul1">Type its name in the </span><span class="f_Para">Entity name input</span><span class="f_ListBul1"> box below the main window; then click the </span><var>Value</var><span class="f_ListBul1"> button. </span>


'''Note:''' For some types of variables, you also need to type the name of special Client functions that produce the appropriate display. Such variables include [[displaying_lists.html|$list]], [[displaying_lists.html|Stringlist or Arraylist object]], and [[display_soap_apps.html|XmlDoc object]]. And for [[displaying_class_variables.html|class member Variables]], you select a right click option from the </span><span class="f_GUIlabel">Watch Window.</span>
'''Note:''' For some types of variables, you also need to type the name of special Client functions that produce the appropriate display. Such variables include [[Displaying $lists, Stringlists, and Arraylists|$list]], [[Displaying $lists, Stringlists, and Arraylists|Stringlist or Arraylist object]], and [[Displaying Janus SOAP XML document objects|XmlDoc object]]. And for [[Displaying all Variables of an object's class|class member Variables]], you select a right click option from the </span><var>Watch Window.</var>


<span class="f_Para">Either of the preceding approaches displays the </span><span class="term">%var</span><span class="f_Para"> variable value in a separate </span><span class="f_GUIlabel">Value of %var</span><span class="f_Para"> window: </span>
<span class="f_Para">Either of the preceding approaches displays the </span><span class="term">%var</span><span class="f_Para"> variable value in a separate </span><var>Value of %var</var><span class="f_Para"> window: </span>


[[File:valuewindow0b_zoom55.gif|392x202px|valueWindow0b]]<span class="f_Para"> </span>
[[File:valuewindow0b_zoom55.gif|392x202px|valueWindow0b]]<span class="f_Para"> </span>


'''Note:''' If you have the [[using_macro_console_cmdline.html|console]] open, the value is displayed there instead of in a ><span class="f_GUIlabel">Value</span><span class="f_Notes"> window. To override this default, use the </span><span class="f_Monospace">valueDisplayOnConsole</span><span class="f_Notes"> option of the Client </span><span class="f_Monospace">[[setpreference_cmd.html|setPreference]]</span><span class="f_Notes"> command. </span>
'''Note:''' If you have the [[Using the console and command line|console]] open, the value is displayed there instead of in a ><var>Value</var><span class="f_Notes"> window. To override this default, use the </span><span class="term">valueDisplayOnConsole</span><span class="f_Notes"> option of the Client </span><span class="term">[[setPreference command|setPreference]]</span><span class="f_Notes"> command. </span>


<span class="f_Para">By default, any line end characters in the value are honored in the </span><span class="f_GUIlabel">Value </span><span class="f_Para">display window, and the value is broken into lines accordingly. </span>
<span class="f_Para">By default, any line end characters in the value are honored in the </span><var>Value </var><span class="f_Para">display window, and the value is broken into lines accordingly. </span>


*<span class="f_ListBul1">To see a value unbroken at line ends, you click the </span><span class="f_GUIlabel">Wrap </span><span class="f_ListBul1">button. From wrap mode, you can always revert to line end mode by clicking </span><span class="f_GUIlabel">Honor Line Ends</span><span class="f_ListBul1">. </span>
*<span class="f_ListBul1">To see a value unbroken at line ends, you click the </span><var>Wrap </var><span class="f_ListBul1">button. From wrap mode, you can always revert to line end mode by clicking </span><var>Honor Line Ends</var><span class="f_ListBul1">. </span>
*<span id="binary" class="hmanchor"></span><span class="f_ListBul1">To see the raw binary representation of the value (16 bytes per line), click the </span><span class="f_GUIlabel">Binary</span><span class="f_ListBul1"> button. </span>
*<span id="binary" class="hmanchor"></span><span class="f_ListBul1">To see the raw binary representation of the value (16 bytes per line), click the </span><var>Binary</var><span class="f_ListBul1"> button. </span>


<span class="f_ListContinue">This option is useful if the data is not printable (for example, whitespace characters), or if you simply want to see the pre translation EBCDIC values of the data (since the Debugger Client normally converts strings to ASCII for display). </span>
<span class="f_ListContinue">This option is useful if the data is not printable (for example, whitespace characters), or if you simply want to see the pre translation EBCDIC values of the data (since the Debugger Client normally converts strings to ASCII for display). </span>
Line 27: Line 27:
[[File:binary2_zoom55.gif|392x202px|binary2]]<span class="f_ListContinue"> </span>
[[File:binary2_zoom55.gif|392x202px|binary2]]<span class="f_ListContinue"> </span>


<span class="f_ListContinue">Clicking either </span><span class="f_GUIlabel">Honor Line Ends</span><span class="f_ListContinue"> or </span><span class="f_GUIlabel">Wrap </span><span class="f_ListContinue">restores the original ASCII representation. </span>
<span class="f_ListContinue">Clicking either </span><var>Honor Line Ends</var><span class="f_ListContinue"> or </span><var>Wrap </var><span class="f_ListContinue">restores the original ASCII representation. </span>


*To print or save the value, use the <span class="f_GUIlabel">Print</span><span class="f_Para"> or </span><span class="f_GUIlabel">Save</span><span class="f_Para"> options of the </span><span class="f_GUIlabel">File</span><span class="f_Para"> menu. The </span><span class="f_GUIlabel">Save</span><span class="f_Para"> option saves the file in the Value window's current display format (ordinary text or hexadecimal digits) in the location you select.  To search the value display, use the search bar controls on the bottom of the window. </span>
*To print or save the value, use the <var>Print</var><span class="f_Para"> or </span><var>Save</var><span class="f_Para"> options of the </span><var>File</var><span class="f_Para"> menu. The </span><var>Save</var><span class="f_Para"> option saves the file in the Value window's current display format (ordinary text or hexadecimal digits) in the location you select.  To search the value display, use the search bar controls on the bottom of the window. </span>


'''Note:''' The </span><span class="f_Monospace">[[valueDisplay command|valueDisplay]]</span><span class="f_Notes"> mappable Client command has the same effect as the </span><span class="f_GUIlabel">Value</span><span class="f_Notes"> button for the value </span><span class="f_ListBul1">in the </span><span class="f_GUIlabel">Watch Window</span><span class="f_Notes"> text box. </span>
'''Note:''' The </span><span class="term">[[valueDisplay command|valueDisplay]]</span><span class="f_Notes"> mappable Client command has the same effect as the </span><var>Value</var><span class="f_Notes"> button for the value </span><span class="f_ListBul1">in the </span><var>Watch Window</var><span class="f_Notes"> text box. </span>


See Also:
See Also:
: [[Getting a detailed view of the value of a watched item|Getting a detailed view of the value of a watched item]]
: [[Getting a detailed view of the value of a watched item|Getting a detailed view of the value of a watched item]]
: [[Displaying $lists, Stringlists, and Arraylists|Displaying $lists, Stringlists, and Arraylists]]
: [[Displaying $lists, Stringlists, and Arraylists|Displaying $lists, Stringlists, and Arraylists]]
: [[display_soap_apps.html|Displaying Janus SOAP XML document objects]]
: [[Displaying Janus SOAP XML document objects|Displaying Janus SOAP XML document objects]]
: [[displaying_class_variables.html|Displaying all Variables of an object's class]]
: [[Displaying all Variables of an object's class|Displaying all Variables of an object's class]]
: [[displaying_current_occurrence.html|Displaying the current occurrence value in an FEO loop]]
: [[Displaying the current occurrence value in an FEO loop|Displaying the current occurrence value in an FEO loop]]


[[Category:Debugger Home]]
[[Category:Debugger Home]]

Revision as of 01:36, 3 November 2022

While the Debugger is evaluating program code in the Source Code tab, you can view the value of a variable or field (one time), without adding it to the Watch Window for continuous watching. You do either of the following:

  • Right click the Source Code line in which the variable (say, %var), is referenced or declared, then select the resulting "Display %var" menu option.  
Or:
  • Type its name in the Entity name input box below the main window; then click the Value button.

Note: For some types of variables, you also need to type the name of special Client functions that produce the appropriate display. Such variables include $list, Stringlist or Arraylist object, and XmlDoc object. And for class member Variables, you select a right click option from the Watch Window.

Either of the preceding approaches displays the %var variable value in a separate Value of %var window:

valueWindow0b

Note: If you have the console open, the value is displayed there instead of in a >Value window. To override this default, use the valueDisplayOnConsole option of the Client setPreference command.

By default, any line end characters in the value are honored in the Value display window, and the value is broken into lines accordingly.

  • To see a value unbroken at line ends, you click the Wrap button. From wrap mode, you can always revert to line end mode by clicking Honor Line Ends.
  • To see the raw binary representation of the value (16 bytes per line), click the Binary button.

This option is useful if the data is not printable (for example, whitespace characters), or if you simply want to see the pre translation EBCDIC values of the data (since the Debugger Client normally converts strings to ASCII for display).

The binary display shows any printable characters to the right of the hex data, enclosed by asterisks. Unprintable characters are represented by periods:

binary2

Clicking either Honor Line Ends or Wrap restores the original ASCII representation.

  • To print or save the value, use the Print or Save options of the File menu. The Save option saves the file in the Value window's current display format (ordinary text or hexadecimal digits) in the location you select.  To search the value display, use the search bar controls on the bottom of the window.

Note: The valueDisplay mappable Client command has the same effect as the Value button for the value in the Watch Window text box.

See Also:

Getting a detailed view of the value of a watched item
Displaying $lists, Stringlists, and Arraylists
Displaying Janus SOAP XML document objects
Displaying all Variables of an object's class
Displaying the current occurrence value in an FEO loop