Previous Topic Next topic Print topic


Debugging the Online Application

Important: You need Enterprise Developer or Enterprise Developer for z Systems to debug applications as this feature is not supported in Enterprise Developer Connect.

Starting the server

If the enterprise server is not yet started, you should start it as follows:

  1. Click the Server Explorer tab in the bottom right pane of the IDE.

    If the tab is not visible, click Window > Show View > Other.... Select Micro Focus COBOL > Server Explorer and then click OK.

  2. In Server Explorer, right-click the Bankdemo server and then click Start.

    Wait until the server has started. If in the list of servers in Server Explorer BANKDEMO still has a red square next to it, right-click it and click Refresh.

Starting the debugger

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:

  1. In the Team Developer Tree view, select the BANKDEMO project and then select Run > Debug Configurations... from the menu bar.
  2. In the left-hand pane of the Debug Configurations dialog box, expand COBOL Enterprise Server.
  3. Click CICS Debug and then click Debug.
  4. You might receive a message about opening the Debug perspective. Click Yes.

    This opens a new Debug pane, showing the COBOL debugger that is waiting for an attachment:

    Bakdemo tutorial - wait for attachment

    In addition, in the top right corner of the main screen, the perspective has changed from Team Developer to Debug:Bakdemo tutorial - COBOL and Debug perspectives. You can click on these tabs to switch between the Debug and Team Developer perspectives.

    Your Eclipse application is now waiting for an event to happen that will trigger the debugging.

  5. In the toolbar, click the downward arrow next to the debug icon, .

    You can see that the pre-configured CICS and JCL debug configurations have now appeared in the menu.

  6. In the Debug view, right-click the COBOL Debugger thread, and click Show Rumba Terminal.

    This opens the Rumba Mainframe Display view within the IDE.

  7. Click the New Rumba Mainframe Display button, New Rumba Mainframe Display, in the toolbar of the Rumba Mainframe Display view.
  8. Specify the host name and the TN3270 port number for the Bankdemo server as follows:

    Bakdemo tutorial - new TN3270 connection

  9. Click Connect.

    This connects the display to the Bankdemo server and loads the start screen of the application.

  10. Press CTRL+SHIFT+Z to clear the screen of the emulator.
  11. Enter transaction id BANK and press Enter.

    The program SBANK00P starts to execute on line 001600.

    Bakdemo tutorial - step into the code

Simple debugging

You use the same features as previously to debug the application.

  1. Click Run > Step Into or press F5 a few times to go through executing the code.
  2. Watch how the values of the variables shown in the Variable view change.

    Bakdemo tutorial - variables view

Stopping debugging

  1. Click Run > Terminate or click the terminate button, Terminate, in the debugger toolbar to stop debugging.

    Bakdemo tutorial - terminate debugging

  2. Finally, click the Team Developer perspective buttonBakdemo tutorial - COBOL and Debug perspectives, to switch back to editing your application.
Previous Topic Next topic Print topic