Start Debugging, Suspending, Resuming, Stepping, Terminating

Once the debug configurations have been defined (see Run and Debug Configurations) the application can be started for debugging by Run > Debug As, selecting the name of your debug configuration.

Note, however, remote debugging strongly requires the usage of Terminal Connection, see Installing Fujitsu Software BS2000 BS2IDE - Terminal Connection.

In the Debug Perspective the tool bar contains the following buttons to control the execution of the application:

  Suspend Suspending the running application. The effect is equivalent to pressing K2.
F8 Resume Resuming the running application. The effect is equivalent to entering %RESUME.
Ctrl+F2 Terminate Resuming the running application. The effect is equivalent to pressing K2 and unloading the application.
F5 Step Into Performing a single step, see below. The effect is equivalent to %TRACE 1.
F6 Step Over Performing a single step, see below. The effect is equivalent to %TRACE 1.
  Ctrl+R Run to Line Executing the program to the currently selected line in the editor.
  Ctrl+F8 Resume at Line Resuming the program at the currently selected line in the editor.

Stepping

When the application is suspended you can continue execution for a single step, i.e. executing a single high level statement, by clicking Step Into or Step Over. BS2IDE will then perform the AID command %TRACE 1 %INSTR for Assembler programs and %TRACE 1 %STMT for other languages.

Note, depending on the programming language, %TRACE 1 behaves as Step Over (i.e. stepping over procedure or function calls) or as Step Into (i.e. stepping into called functions or procedures). Because BS2IDE does not know the behavior of AID, both Step Into and Step Over are uniformly enabled for stepping, and Step Return is permanently disabled.

Run to line

When the application is suspended, it is possible to resume execution until a specified line is executed. This is a convenient way to suspend execution at a line without setting a breakpoint.

Place your cursor on the line at which you want the program to run. Then select the Run to Line command from the context menu or use Ctrl+R. Program execution is resumed and suspends just before the specified line is to be executed.

If it is not possible for AID to set a temporary breakpoint at the specified line, a message box with the error message from AID is opened.

It is possible that the line will never be hit and that the program will not suspend.

Resume at line

When the application is suspended, it is possible to define a continuation address at which the program is to continue. The continuation address must be located in the same program as the current interrupt point.

Place your cursor on the line at which you want the program to resume. Then select the Resume at Line command from the context menu or use Ctrl+F8. Program execution is resumed at the specified line.

If it is not possible for AID to jump to the specified line, a message box with the error message from AID is opened.

Resume at line is only supported within programs, where the language supports this feature, e.g. COBOL (realized by AID command %JUMP <address>) and Assembler (realized by AID command SET <address> INTO %PC). In COBOL programs the continuation line must be the first instruction in a section or paragraph in the PROCEDURE DIVISION. For detailed information see AID user guide "Debugging Cobol Programs", AID Command %JUMP.

The user must ensure that the prerequisites (e.g. index or counter states, file status) for error-free execution of program as of the continuation address defined have been fulfilled.

Console for interactive input to and output from the running application

The output of the running application can be viewed in the Console view (to be opened via command link Window > Show View > Other... > General > Console).

In this Console view you can also enter data the application is prompting for. If the application is suspended (e.g. because has been pressed or a breakpoint is reached) BS2000 commands can be entered as well. For input of AID commands you can activate a debug configuration option for converting AID commands to upper case, see Debug Configuration.