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 |
Description:
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:
- Invoke an AS/400 emulation screen leaving on the Signon display screen.
- 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.
- The emulation screen should now look like this:
Leave the selection as *FIRST / *FIRST.

- Press Enter and the debug facility is invoked.

- Select statements to be debugged.

- Select variables to be debugged.

- The application is now in debug mode. Follow the statements
selected through

- Then when the REQUEST or DISPLAY statement is reached, debug ends and control
interaction is now at 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.

- For example, changed the Company description and pressed the Next button.

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

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

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

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.