There are several debug options and configurations. In the following steps, you create a local debug session.
-
Select your project in the
COBOL Explorer view view and from the main menu click
This starts the
Debug Configurations dialog box and selects the run configuration you created before. You can either use this configuration or create a new one,
especially for debugging.
-
Create a new debug configuration. You can do this in two ways:
- Double-click the
COBOL Application tree item, or
- Click the
COBOL Application tree item, and then click
(New launch configuration).
-
Ensure that settings for your configuration match these:
Field
|
Value
|
Name
|
"tictac_configuration"
|
COBOL Project
|
"tictac"
|
Program is part of project build configuration
|
Selected, and with a value of "New Configuration"
|
Main program or executable to debug
|
"New_Configuration.bin/tictac.exe (Windows) or
New_Configuration.bin/tictac (UNIX)"
|
-
Click
Debug.
By default, a
Confirm Perspective Switch dialog box is displayed. This is because Eclipse offers a different perspective for debugging that has views that provide
relevant information that you might need. Click
Yes to confirm the switch and start debugging.
Some of the view that you see in this perspective are:
- The
Debug view shows the threads that are running in the application. For each thread, the status execution positions are shown. In
addition, an application window opens where the specific steps in your application will be displayed as debugging takes place.
- The
Variables view displays data items and internal file names that are referenced on the current line and in the previous stepped statement.
This allows you to view the before and after values or statuses of a particular item. You can set breakpoints by double-clicking in the margin at the far left of the source view and then run the program to the
breakpoint by clicking
.
For more information on debugging your application, see
Debugging Features and Techniques in Eclipse.
-
To stop debugging, click
Terminate. Alternatively, press
Ctrl+F2.
-
To change back to the
COBOL perspective, click
COBOL at the top right corner.