Run and Debug
In order to run or debug a program from inside the IDE, highlight the main source file name in the isCOBOL Explorer or click on the editor window for the main program file, and click on the Run menu and choose Run As -> isCOBOL Application or Debug As -> isCOBOL Application.
To set additional runtime options, create a "Run/Debug Configuration" by clicking on the Run menu and choosing Run Configurations... or Debug Configurations...
The following panel will appear:
After clicking on the New button, a panel will appear on the right.
Ensure that the fields are filled as follows:
Name: name of the configuration (any name can be used).
Project: name of the project in which programs are stored.
Program name: name of the main program that must start.
System properties: COBOL configuration file and other Java options (i.e. -DisCOBOL.conf=C:/etc/isCOBOL.properties -Xmx256m )
Arguments: arguments that must be passed to the program, if they exist.
Working Directory: the working directory for the runtime process. Every relative path in the program will refer to this directory.
One or more Configurations can be created to test different launches of the program (i.e. Testing with different configuration files, testing with different arguments, etc.).
Once the Configuration has been created, the program can be run or debugged.
To run:
click on the Run menu
choose Run As
choose the Configuration to be used.
To debug:
click on the Run menu
choose Debug As
choose the Configuration to be used.
Run and Debug features can also be reached through the proper buttons on the IDE toolbar:
The following keyboard shortcuts are also available:
CTRL+F11
Run As
F11
Debug As
Note - When the user runs or debugs a program, if there are some unsaved editors, a message box appears, asking if the user wants to save the editors before the launch. In addition, if the option Build (if required) before launching is checked in Preferences: Run/Debug -> Launching, a build of the project is performed.
While debugging the program, available debug options and commands are shown in the Debug View, just below the editor, and the current statement is highlighted in the Code Editor.
Note: when you create a Run or Debug configuration you can set the working directory for the runtime session. When you run the program without a configuration, the working directory is automatically set to the “output” folder of the project.