Batch Debugging of Web Event Functions

Date:25 May 2000
Product/Release:LANSA for Web
Abstract:Example of Batch Debugging Web Event functions
Submitted By:LANSA Technical Support
Last Review:November 2010

When using the Batch Debugging facility for Web Event functions, each invocation of a function is invoked in the batch debug mode. When a REQUEST or DISPLAY statement has been executed in a Web Event function, the function ends, and the next (or same) function is reinvoked. The Batch debug facility is also reinvoked on the emulation screen.

Each function invoked in the Web Event application can be debugged through this facility.

Example:

As a prerequisite to batch debugging on Web, Interactive Debugging must be turned ON for this to work. This is outlined in the documentation under Data/Application Server (All Platforms)

Data/Application Server documentation page showing Allow Interactive Debuggin setting

  1. Invoke an AS/400 emulation screen leaving on the Signon display screen.
     
  2. Invoke the application on the browser with the batch debug parameters.
     
    +BDEBUG+<device>+<message queue>

    e.g. http://as400:33/CGI-BIN/LANSAWEB?PROCFUN+TESTPROC+TESTDOL+IKP+BDEBUG+QPADEV0010

    Note: If the default for the workstation message queue on the AS/400 is not defaulted to the same name as the device name, then specify the workstation message queue.
     
  3. The emulation screen should now look like this:

    Leave the selection as *FIRST / *FIRST.
    Leave the selection as *FIRST / *FIRST.
     
  4. Press Enter and the debug facility is invoked.
    Press Enter and the debug facility is invoked.
     
  5. Select statements to be debugged.
    Select statements to be debugged.
     
  6. Select variables to be debugged.
    Select variables to be debugged.
     
  7. The application is now in debug mode. Follow the statements selected through
    The application is now in debug mode. Follow the statements selected through.
     
  8. Then when the REQUEST or DISPLAY statement is reached, debug ends and control interaction is now at the browser.
    Then when the REQUEST or DISPLAY statement is reached, debug ends and control interaction is now at the browser.
     
  9. It is now the Browser which has control. Debug is still active and will be reinvoked when some sort of action has been taken on the browser.
    It is now the Browser which has control. Debug is still active and will be reinvoked when some sort of action has been taken on the browser.
     
  10. For example, changed the Company description and pressed the Next button.
    For example, changed the Company description and pressed the Next button.

  11. Now, look at the emulation screen again. The debug facility is invoked again.

    If it is not the same function which has been invoked, the *FIRST / *FIRST automatic selection will debug the correct function. (The first Web function was TESTDOL, it is now TESTDO2 which has been invoked by the Next button and accordingly, is selected for debug.)
    Now, look at the emulation screen again. The debug facility is invoked again. 

  12. And it is TESTDO2 which is ready to be debugged.
    And it is TESTDO2 which is ready to be debugged.

  13. And then invoked on the browser and interaction is again with the browser, until some sort of action is taken, which would then result in the debug facility reinvoked on the emulation screen.
    And then invoked on the browser and interaction is again with the browser, until some sort of action is taken.

    Therefore, in Web Event functions, the debug facility is invoked when the browser interaction has invoked a function. The control interaction passes back and forth between the debug facility and the browser.