Debugging the Online Application

Starting the Bankdemo enterprise server

If the enterprise server is not yet stated, you need to start it as follows:

  1. In the IDE, open the Server Explorer window.

    If the window is not visible, click View > Server Explorer (or View > Other Windows > Server Explorer).

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

    Wait 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.

  3. In Server Explorer window, right-click Micro Focus Servers and click Refresh to confirm the server has started.

Starting the debugger

The demonstration application includes around 60 programs and just eight of them, the ones which are included in the project, are debuggable. The default debugger in Enterprise Developer is the CICS debugger. You are going to use this to debug the online Bankdemo application:

  1. In Solution Explorer, right-click the Bankdemo project, and click Properties.
  2. Click the Debug tab in the properties.
  3. Set Active Setting to CICS.
  4. Under CICS Settings, type BANK in the Transaction field.
  5. Click File > Save All to save your changes.

To start the debugger:

  1. Click Debug > Step Into.

    Visual Studio enters debug mode with a few new windows open in the IDE. The embedded Rumba display starts as well - if it is not started, click the mainframe TN3270 display icon, GUID-5BAA56BC-A0AF-4173-8CE7-D6C0CB602FFC-low.png, on the debug tool bar, or click Debug > Windows > Mainframe TN3270 Display. This opens the embedded Rumba display and automatically connects the session to the enterprise server.

    The application is now waiting for an event that will trigger the debugging. You now need to open the embedded Rumba display if it is not shown, and connect to your Bankdemo Rumba configuration.

    GUID-8F09C983-C2B8-4F4D-9A48-0F17432584AA-low.png

  2. Press Ctrl+Shift+Z to clear the screen.
  3. Enter transaction id BANK and press Enter.

    The program SBANK00P starts to execute on line 001600.

Simple debugging

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

  1. Click Debug > Step Into or press F11 a few times to go through executing the code.
  2. Watch how the values of the variables changes in the Variable window changes.

Stop debugging

Although the job has completed, the debugger is still waiting for the next event. To stop debugging:

  1. Click Debug > Stop Debugging.