Run and Debug Configurations

Either switch to the Debug perspective or ensure that the Launch command group is available in your perspective. If the Launch group is available the Run menu show entries Run Configurations... and Debug Configurations....

To make the Launch command group available open the Window > Customize Perspective... dialog, tick Launch in the tab Command Groups Availability, and press OK.

To define a new run or debug configuration open the Run > Run Configurations... or the Run > Debug Configurations... dialog, select Remote BS2000 Application and press the New Launch Configuration button in the dialog's tool bar.

In the opened dialog enter a name for your new configuration. In the Main tab enter the project this run or debug configuration is related to:

In the Start tab you can specify the BS2000 command running or loading your application:

In the Common tab you can specify the target output file. When the file is set then output from console will be saved additionally to provided file.
If Append is selected then console output will be added at the end of existing file. In other case the file will be replaced:

User input will not be visible in target file. Only Workspace and local File System files are supported for Output File.

Debug Configuration

Debugging is based on AID's symbolic debugging functionality. Thus the prerequisites for symbolic debugging must be ensured: For examples of compile and bind procedures enabling test support see Example project with linked remote resources and Example project with local resources.

The Main tab for the debug configuration is similar to that for the run configuration, except that it contains two additional check boxes:

The Start command for debugging must load the program, but not start it. If Resume program ... is selected in the debug configuration (the default), BS2IDE will perform %RESUME after the program has been loaded and BS2IDE has set breakpoints with %INSERT. The /LOAD command must either specify TEST-OPTION = AID, or must be followed by /%SYMLIB commands to inform AID where to find the LSD.

If necessary, the environment required for the application can be set up before loading the program (e.g. setting file links or defining job variables). Here is the debug configuration corresponding to the example project demo2, see Example project with local resources. It starts the data base handler and sets the appropriate file links before loading the program:

Of course the entire command sequence can be put in a BS2000 command procedure so that the command in the debug configuration is just a call of this procedure. In this case the /LOAD-EXECUTABLE-PROGRAM command can be followed by /HOLD-PROCEDURE and commands to tear-down:

 ... commands to set-up the environment
 /LOAD-EXECUTABLE-PROGRAM ..., TEST-OPTION = AID
 /HOLD-PROCEDURE
 ... commands to tear-down the environment
If Resume procedure ... is selected in the Main tab of the debug configuration, BS2IDE will execute /RESUME-PROCEDURE after termination of the debugged program, causing the tear-down commands to be executed. BS2IDE internally sets the AID command %AID LOW=ON. For input of own AID commands in the Console view it is possible to select Convert user entered AID commands to upper case. Then during debug session all AID commands entered in Console view are converted to upper case before transfer to BS2000.

Several run and debug configurations

You can define several run and debug configurations. For instance, if there are several projects in your workspace you typically will define individual run and debug configurations for each project. So does the navigation panel in the last screenshot above show run and debug configurations for both example projects, demo1 and demo2.