If the enterprise server is not yet started, you need to start it as follows:
If the view is not visible, click OK.
. Select and then clickWait until the server has started. In the list of servers in Server Explorer, BANKDEMO still has a red square next to it. This is a refresh delay.
The project has two pre-configured debug configurations; a CICS Debug and a JCL Debug one, that you will use to debug the batch and the online application.
You can now start the debugger. It starts in the background until a program which is debuggable is triggered. The demonstration application includes around 60 programs and just eight of them, the ones which are included in the project, are debuggable. To start the debugger:
This opens a new Debug pane, saying it is waiting for attachment. In addition, in the top right of the main screen, the view
has changed from
Team Developer to
Debug:
Click the respective icon to switch between the two perspectives.
The application is now waiting for an event that will trigger debugging.
You are going to look at some simple features inside the debugger. Start by submitting the JCL job:
This starts the debugger and opens ZBNKEXT1.cbl for debugging, with the execution point set on the first line of Procedure Division.
The highlighted line of code is the one the IDE will execute next.
The PERFORM statement executes and takes you to the line starting with IF TIMER. You can also see that a Variables view is now open in the IDE showing the current value of a data item on the line of code which is about to be executed.
This provides you with details of the location, the size, the format, the number of times the field is used in the program, and the current value of the data item.
This opens a pop-up window showing the value of the data item. Currently, it is 00000.
This opens the Expressions tabbed view and adds the data item to it.
The new value is used from this point.
You can use the COBOL Source Information (CSI) functionality and its Quick Browse dialog to obtain information about your program when you are debugging it. This example shows details for data items starting WS-, such as the name, definition, and amount of times each item occurs in the program.
The results are shown in the Search view.
To see more examples of CSI queries, start the Quick Browse dialog box again and press F1 to open the product help.
Check the Breakpoints view at the top right of the screen. Currently, there are no breakpoints set in the program. To set a simple breakpoint:
The execution of the code stops at the first breakpoint.
You can see that ZBNKEXT1.cbl finishes and the debugger starts to debug the second program defined in the JCL.
This program executes to completion and the job completes.
Although the job has completed, the debugger is still waiting for the next event. To stop debugging: