Step, Step Over, and Run

From m204wiki
Jump to navigation Jump to search

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.