Resuming program execution and running to location

About this task

When program execution stops, you can resume it in any of the following ways:

Procedure

Results

The program will stop at the next encountered breakpoint or unmonitored exception, or it will run to completion, or wait for input from a 5250.

Note: If the program was launched via a launch configuration and the launch configuration Terminate debug session on program completion check box was selected, the debug session will terminate when the program completes.

If you are debugging a job and specified a program name in the Debug Job launch configuration and cleared the Step Into control, you will be asked to start your IBM® i application when you launch the debug session. If you need to terminate the debug session prior to program completion or if you launched the debug session without specifying a program name or if you specified a service program for debugging, use a terminate action to terminate the program. For information about terminating a debug session, see the related topic below.

Run to Location

About this task

If you would like to stop at a specific line in your program, you can use the Run to Location feature rather than setting a breakpoint on the line.

Select Run to Location and the program will run to the selected statement unless an active breakpoint is hit, an exception occurs, the end of the program is reached, or it is waiting for input from a 5250. The program will run to the statement and stop before executing it or any of its procedure calls. You select the statement by moving the cursor to it. Only executable lines can be run to with Run To Location.

To run a program to a specific line number:

Procedure

  1. Make sure the line to run to is visible in the editor by using the scroll bar or cursor keys to locate the line.
  2. Ensure that the editor cursor is in the line and run the program to the cursor by right-clicking on the line and selecting Run To Location from the pop-up menu. In the editor you can alternatively select Run To Location from the pop-up menu in the marker bar.

Results

Note: Run to Location will not run to the specified location if a breakpoint or unmonitored exception is encountered, or if the program completes without executing the specified location, or if it is waiting for input from a 5250.

Feedback