Step, Step Over, and Run: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__TOC__ <span class="f_Para">These three action options (activated by same named control buttons, commands, or menu item) advance the </span><span class="f_GUIlabel">Source Co...")
 
No edit summary
 
Line 11: Line 11:


=== Step ===
=== Step ===
<span class="f_GUIlabel">Step</span><span class="f_Para"> executes a single User Language statement. When the statement has executed:</span>
<var>Step</var><span class="f_Para"> executes a single User Language statement. When the statement has executed:</span>


* <span class="f_Monospace">Executed one statement</span><span class="f_ListBul1"> is displayed in the [[Status bar|Status box]].</span>
* <span class="f_Monospace">Executed one statement</span><span class="f_ListBul1"> is displayed in the [[Status bar|Status box]].</span>
* <span class="f_ListBul1">The next line to be executed is highlighted.</span>
* <span class="f_ListBul1">The next line to be executed is highlighted.</span>


<span class="f_Para">If you click </span><span class="f_GUIlabel">Step</span><span class="f_ListContinue3"> and </span><span class="f_Para">the current statement (a subroutine call, for example) invokes other statements in the program, the Debugger first &quot;executes&quot; the call statement itself by moving to and highlighting the first of the executable subroutine statements. With each subsequent click of </span><span class="f_GUIlabel">Step,</span><span class="f_Para"> the Client</span><span class="f_GUIlabel"> </span><span class="f_Para">steps through the subroutine, executing one statement at a time.</span>
<span class="f_Para">If you click </span><var>Step</var><span class="f_ListContinue3"> and </span><span class="f_Para">the current statement (a subroutine call, for example) invokes other statements in the program, the Debugger first &quot;executes&quot; the call statement itself by moving to and highlighting the first of the executable subroutine statements. With each subsequent click of </span><var>Step,</var><span class="f_Para"> the Client</span><span class="f_GUIlabel"> </span><span class="f_Para">steps through the subroutine, executing one statement at a time.</span>


<span class="f_Para">If you are at the end of a request (the </span><span class="f_Monospace">End</span><span class="f_Para"> statement is highlighted) and click </span><span class="f_GUIlabel">Step</span><span class="f_Para">, </span><span class="f_Monospace">Evaluation successfully completed</span><span class="f_ListBul2"> is displayed in the status box, and </span><span class="f_Para">execution pauses ([[Suppressing the break at the end of request evaluation|by default]]), giving you a final review. If you click </span><span class="f_GUIlabel">Run,</span><span class="f_Para"> the Debugger Client sends any contents of the </span><span class="f_SimpleList">[[Viewing the web output buffer|web output buffer]]</span><span class="f_Para"> to the browser, or it sends any 3270/Batch2 terminal output to the terminal; then it advances execution to the next request.</span>
<span class="f_Para">If you are at the end of a request (the </span><span class="f_Monospace">End</span><span class="f_Para"> statement is highlighted) and click </span><var>Step</var><span class="f_Para">, </span><span class="f_Monospace">Evaluation successfully completed</span><span class="f_ListBul2"> is displayed in the status box, and </span><span class="f_Para">execution pauses ([[Suppressing the break at the end of request evaluation|by default]]), giving you a final review. If you click </span><span class="f_GUIlabel">Run,</span><span class="f_Para"> the Debugger Client sends any contents of the </span><span class="f_SimpleList">[[Viewing the web output buffer|web output buffer]]</span><span class="f_Para"> to the browser, or it sends any 3270/Batch2 terminal output to the terminal; then it advances execution to the next request.</span>


'''Note:'''<span class="f_Notes"> Pressing the F4 key or the F11 key is the same as clicking </span><span class="f_GUIlabel">Step</span><span class="f_Notes"> button (unless you have [[Reconfiguring GUI buttons and hot keys|reconfigured]] your hot keys).</span>
'''Note:'''<span class="f_Notes"> Pressing the F4 key or the F11 key is the same as clicking </span><span class="f_GUIlabel">Step</span><span class="f_Notes"> button (unless you have [[Reconfiguring GUI buttons and hot keys|reconfigured]] your hot keys).</span>


<span class="f_NoteContinue">Pressing</span><span class="f_ListContinue"> the Enter key after </span><span class="f_NoteContinue">clicking </span><span class="f_GUIlabel">Step</span><span class="f_NoteContinue"> (or whenever the </span><span class="f_GUIlabel">Step</span><span class="f_NoteContinue"> button is highlighted with a white background) repeats the </span><span class="f_GUIlabel">Step</span><span class="f_NoteContinue"> action.</span>
<span class="f_NoteContinue">Pressing</span><span class="f_ListContinue"> the Enter key after </span><span class="f_NoteContinue">clicking </span><var>Step</var><span class="f_NoteContinue"> (or whenever the </span><var>Step</var><span class="f_NoteContinue"> button is highlighted with a white background) repeats the </span><var>Step</var><span class="f_NoteContinue"> action.</span>


<span class="f_NoteContinue">The other </span><span class="f_GUIlabel">Step</span><span class="f_NoteContinue"> button equivalents are the </span><span class="f_Monospace">[[step command|step]]</span><span class="f_NoteContinue"> command and the </span><span class="f_GUIlabel">Step</span><span class="f_NoteContinue"> option of the </span><span class="f_GUIlabel">Execution</span><span class="f_NoteContinue"> menu.</span>
<span class="f_NoteContinue">The other </span><var>Step</var><span class="f_NoteContinue"> button equivalents are the </span><span class="f_Monospace">[[step command|step]]</span><span class="f_NoteContinue"> command and the </span><var>Step</var><span class="f_NoteContinue"> option of the </span><var>Execution</var><span class="f_NoteContinue"> menu.</span>


=== Step Over ===
=== Step Over ===
<span class="f_GUIlabel">Step Over</span><span class="f_ListBul1"> functions like </span><span class="f_GUIlabel">Step</span><span class="f_Para"> with one important difference: it skips subroutines and methods. If the execution position is immediately before an invocation of a method or a simple or complex subroutine, clicking </span><span class="f_GUIlabel">Step Over</span><span class="f_Para"> advances the execution position to immediately before the statement </span><span class="f_EmphBoldItal">after</span><span class="f_ListBul1"> </span><span class="f_Para">the subroutine or method invocation. No debugging is done in the stepped over subroutine or method, nor in any code or daemons that it might call.</span>
<var>Step Over</var><span class="f_ListBul1"> functions like </span><var>Step</var><span class="f_Para"> with one important difference: it skips subroutines and methods. If the execution position is immediately before an invocation of a method or a simple or complex subroutine, clicking </span><span class="f_GUIlabel">Step Over</span><span class="f_Para"> advances the execution position to immediately before the statement </span><span class="f_EmphBoldItal">after</span><span class="f_ListBul1"> </span><span class="f_Para">the subroutine or method invocation. No debugging is done in the stepped over subroutine or method, nor in any code or daemons that it might call.</span>


<span class="f_GUIlabel">Step Over</span><span class="f_Para"> is useful if you know a particular subroutine or method works and you do not want to interactively execute it.</span>
<var>Step Over</var><span class="f_Para"> is useful if you know a particular subroutine or method works and you do not want to interactively execute it.</span>


'''Note:'''<span class="f_Notes"> Pressing the F10 key is the same as clicking the </span><span class="f_GUIlabel">Step Over</span><span class="f_Notes"> button (unless you have [[Reconfiguring GUI buttons and hot keys|reconfigured]] your hot keys).</span>
'''Note:'''<span class="f_Notes"> Pressing the F10 key is the same as clicking the </span><var>Step Over</var><span class="f_Notes"> button (unless you have [[Reconfiguring GUI buttons and hot keys|reconfigured]] your hot keys).</span>
: Pressing the Enter key after clicking <var>Step Over</var><span class="f_NoteContinue"> (or whenever the </span><var>Step Over</var><span class="f_NoteContinue"> button is highlighted with a white background) repeats the </span><var>Step Over</var><span class="f_NoteContinue"> action.</span>


<span class="f_NoteContinue">Pressing the Enter key after clicking </span><span class="f_GUIlabel">Step Over</span><span class="f_NoteContinue"> (or whenever the </span><span class="f_GUIlabel">Step Over</span><span class="f_NoteContinue"> button is highlighted with a white background) repeats the </span><span class="f_GUIlabel">Step Over</span><span class="f_NoteContinue"> action.</span>
<span class="f_Para">Pressing the Alt key while </span><span class="f_NoteContinue">clicking </span><var>Step Over</var><span class="f_Notes"> invokes a [[Stepping out|Step Out]]. Pressing the ALT-F10 key combination has the same effect.</span>


<span class="f_Para">Pressing the Alt key while </span><span class="f_NoteContinue">clicking </span><span class="f_GUIlabel">Step Over</span><span class="f_Notes"> invokes a [[step_out.html|Step Out]]. Pressing the ALT-F10 key combination has the same effect.</span>
<span class="f_NoteContinue">The other </span><var>Step Over</var><span class="f_NoteContinue"> button equivalents are the </span><span class="f_Monospace">[[stepOver command|stepOver]]</span><span class="f_NoteContinue"> command and the </span><var>Step Over</var><span class="f_NoteContinue"> option of the </span><var>Execution</var><span class="f_NoteContinue"> menu.</span>
 
<span class="f_NoteContinue">The other </span><span class="f_GUIlabel">Step Over</span><span class="f_NoteContinue"> button equivalents are the </span><span class="f_Monospace">[[stepOver command|stepOver]]</span><span class="f_NoteContinue"> command and the </span><span class="f_GUIlabel">Step Over</span><span class="f_NoteContinue"> option of the </span><span class="f_GUIlabel">Execution</span><span class="f_NoteContinue"> menu.</span>


=== Run ===
=== Run ===
<span class="f_Para">The </span><span class="f_GUIlabel">Run</span><span class="f_Para"> button “resumes execution” of the program. The User Language statements execute normally, until one of the following events occurs:</span>
<span class="f_Para">The </span><var>Run</var><span class="f_Para"> button “resumes execution” of the program. The User Language statements execute normally, until one of the following events occurs:</span>


* <span class="f_ListBul1">End of request (the final end statement is highlighted, and </span><span class="f_Monospace">Evaluation successfully completed</span><span class="f_ListBul1"> is displayed in the status box)</span>
* <span class="f_ListBul1">End of request (the final end statement is highlighted, and </span><span class="f_Monospace">Evaluation successfully completed</span><span class="f_ListBul1"> is displayed in the status box)</span>
Line 47: Line 46:
* <span class="f_ListBul1">Code that a daemon executes is called</span>
* <span class="f_ListBul1">Code that a daemon executes is called</span>


<span class="f_Para">Once the end of a request is reached, execution pauses ([[Suppressing the break at the end of request evaluation|by default]]), giving you a final review. You must click </span><span class="f_GUIlabel">Run</span><span class="f_Para"> again for the Debugger to send any contents of the </span><span class="f_SimpleList">[[Viewing the web output buffer|web output buffer]]</span><span class="f_Para"> to the browser or any 3270/Batch2 terminal output to the terminal, and advance execution to the next request. </span>
<span class="f_Para">Once the end of a request is reached, execution pauses ([[Suppressing the break at the end of request evaluation|by default]]), giving you a final review. You must click </span><var>Run</var><span class="f_Para"> again for the Debugger to send any contents of the </span><span class="f_SimpleList">[[Viewing the web output buffer|web output buffer]]</span><span class="f_Para"> to the browser or any 3270/Batch2 terminal output to the terminal, and advance execution to the next request. </span>


<span class="f_Para">If no further requests are queued, the </span><span class="f_GUIlabel">Run</span><span class="f_Para"> button is disabled.</span>
<span class="f_Para">If no further requests are queued, the </span><var>Run</var><span class="f_Para"> button is disabled.</span>


'''Note:'''<span class="f_Notes"> Pressing the F5 key is the same as clicking the </span><span class="f_GUIlabel">Run</span><span class="f_Notes"> button (unless you have [[Reconfiguring GUI buttons and hot keys|reconfigured]] your hot keys). </span>
'''Note:'''<span class="f_Notes"> Pressing the F5 key is the same as clicking the </span><var>Run</var><span class="f_Notes"> button (unless you have [[Reconfiguring GUI buttons and hot keys|reconfigured]] your hot keys). </span>


<span class="f_NoteContinue">Pressing</span><span class="f_ListContinue"> the Enter key after </span><span class="f_Notes">clicking </span><span class="f_GUIlabel">Run</span><span class="f_NoteContinue"> (or whenever the </span><span class="f_GUIlabel">Run</span><span class="f_Notes"> </span><span class="f_NoteContinue">button is highlighted with a white background) repeats the </span><span class="f_GUIlabel">Run</span><span class="f_NoteContinue"> action. </span>
<span class="f_NoteContinue">Pressing</span><span class="f_ListContinue"> the Enter key after </span><span class="f_Notes">clicking </span><var>Run</var><span class="f_NoteContinue"> (or whenever the </span><var>Run</var><span class="f_Notes"> </span><span class="f_NoteContinue">button is highlighted with a white background) repeats the </span><var>Run</var><span class="f_NoteContinue"> action. </span>


<span class="f_NoteContinue">The other </span><span class="f_GUIlabel">Run</span><span class="f_NoteContinue"> button equivalents are the </span><span class="f_Monospace">[[run command|run]]</span><span class="f_NoteContinue"> command and the </span><span class="f_GUIlabel">Run</span><span class="f_NoteContinue"> option of the </span><span class="f_GUIlabel">Execution</span><span class="f_NoteContinue"> menu. </span>
<span class="f_NoteContinue">The other </span><var>Run</var><span class="f_NoteContinue"> button equivalents are the </span><span class="f_Monospace">[[run command|run]]</span><span class="f_NoteContinue"> command and the </span><var>Run</var><span class="f_NoteContinue"> option of the </span><var>Execution</var><span class="f_NoteContinue"> menu. </span>


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

Latest revision as of 13:52, 25 April 2023

These three action options (activated by same named control buttons, commands, or menu item) advance the Source Code page (or Daemon page) processing position by executing one or more "executable" User Language statements:

3buttonsa

A statement is executable if it produces a run time action. Neither a variable declaration nor a class definition, for example, is executable.

When no executable code operations remain, these buttons are dimmed.

When a button is highlighted (color is white, border is bold), the action it invokes can be executed by pressing the Enter key.

Step

Step executes a single User Language statement. When the statement has executed:

  • Executed one statement is displayed in the Status box.
  • The next line to be executed is highlighted.

If you click Step and the current statement (a subroutine call, for example) invokes other statements in the program, the Debugger first "executes" the call statement itself by moving to and highlighting the first of the executable subroutine statements. With each subsequent click of Step, the Client steps through the subroutine, executing one statement at a time.

If you are at the end of a request (the End statement is highlighted) and click Step, Evaluation successfully completed is displayed in the status box, and execution pauses (by default), giving you a final review. If you click Run, the Debugger Client sends any contents of the web output buffer to the browser, or it sends any 3270/Batch2 terminal output to the terminal; then it advances execution to the next request.

Note: Pressing the F4 key or the F11 key is the same as clicking Step button (unless you have reconfigured your hot keys).

Pressing the Enter key after clicking Step (or whenever the Step button is highlighted with a white background) repeats the Step action.

The other Step button equivalents are the step command and the Step option of the Execution menu.

Step Over

Step Over functions like Step with one important difference: it skips subroutines and methods. If the execution position is immediately before an invocation of a method or a simple or complex subroutine, clicking Step Over advances the execution position to immediately before the statement after the subroutine or method invocation. No debugging is done in the stepped over subroutine or method, nor in any code or daemons that it might call.

Step Over is useful if you know a particular subroutine or method works and you do not want to interactively execute it.

Note: Pressing the F10 key is the same as clicking the Step Over button (unless you have reconfigured your hot keys).

Pressing the Enter key after clicking Step Over (or whenever the Step Over button is highlighted with a white background) repeats the Step Over action.

Pressing the Alt key while clicking Step Over invokes a Step Out. Pressing the ALT-F10 key combination has the same effect.

The other Step Over button equivalents are the stepOver command and the Step Over option of the Execution menu.

Run

The Run button “resumes execution” of the program. The User Language statements execute normally, until one of the following events occurs:

  • End of request (the final end statement is highlighted, and Evaluation successfully completed is displayed in the status box)
  • A cancelling error such as subscript out of range, or a null object reference  (the line that raised the error is highlighted)
  • A breakpoint (the line containing the breakpoint is highlighted)
  • Code that a daemon executes is called

Once the end of a request is reached, execution pauses (by default), giving you a final review. You must click Run again for the Debugger to send any contents of the web output buffer to the browser or any 3270/Batch2 terminal output to the terminal, and advance execution to the next request.

If no further requests are queued, the Run button is disabled.

Note: Pressing the F5 key is the same as clicking the Run button (unless you have reconfigured your hot keys).

Pressing the Enter key after clicking Run (or whenever the Run button is highlighted with a white background) repeats the Run action.

The other Run button equivalents are the run command and the Run option of the Execution menu.