Step 4. Use Debug when the WAM is running on the server

WAM055 - Using LANSA Debug

To complete this step you must be using a Slave Workstation installation of Visual LANSA with a Master Repository on an IBM i server.

Debug with the WAM running on the server, requires communication from the developer's PC to the IBM i server and from the IBM i server to the developer's PC.

Visual LANSA Debug is a service that is started when VL starts. See File / Editor Options and select Debug:

This shows that the debug service is running on Port 51234.

The IBM i server's communication to the developer's PC may rely on a locally defined Domain Name Server (DNS) to resolve the developer's PC Name to an IP address. Alternatively a routing entry must be defined for each developer's PC including the IP Address for the PC:

To access this screen use the LANSA/CONFIGURE IBM i command and select, COMMS_EXTENSIONS followed by COMMS_ROUTING_RECORDS. See the LANSA for iSeries User Guide for detailed information.

LANSA Web running on the IBM i must be configured to allow interactive debug. This setting enables you to ensure that debug can only operate on your development or test system. The LANSA Web Administrator enables this setting to be enabled:

Restart LANSA Web after changing this setting. The Web Administrator Clean Up option will restart LANSA for the Web.

1. Check in your WAM iiiSecMaint. Its WAM layout, iiisecma_layout and the common WAM layout iiilay01 will be included automatically. Check this by selecting the WAM and using the Cross Reference dialog.

     Make sure you check the options to compile the WAM and make it debug enabled.

2.  In the Local Cross References dialog expand the WAM layout. iiisecma_layout.

a.  Select the common layout, iiilay01 and click the green cross button as shown, to add it to the list of objects to be checked in.

     If required, you can select any other locally defined object and click the green cross button as shown to include these in the check in.

3.  Review the Check-in tab and ensure that your check-in and compile was successful.

4.  You now need to change your WAM execution settings, so that when you run the WAM from the Design view, it is run on the IBM i server.

a.  From the File tab, open the Editor Options dialog and select the WAM settings.

b.  Change the Application Base URL setting to point to the server name for your LANSA IBM i system. Alternatively specify an IP Address.

c.  Use the Test button to check your entry is correct.

d.  Click OK to save your changes.

     When you run your WAM it will now execute on the IBM i server.

5.  From the Design view, Run your Begin WebRoutine to prove you can run the WAM on the IBM i server.

6.  You should currently have the ADD_ENTRY statement set as a break point. Run your WAM again, this time in Debug mode. You will now be able to debug your WAM exactly as before, when you were running the WAM locally.