This section describes the different tools for debugging Open Host Interface Objects (OHIOLO) applets and how to use them.
Host
On-Demand's OHIOLO incorporates a trace facility which can be activated
programmatically by passing specific parameters to the iOhioSession
constructor. The trace facility provides a user-friendly, windowed
interface and allows customizable tracing of the public OHIOLO classes as
well as most of the internal classes.
The trace facility supports different trace levels from 1 to 3. Each trace level is cumulative with the previous trace level, with 1 producing the least trace information and 3 producing the most. Trace level 1 generates trace information for method entry and exit, including method parameters and return values. Trace level 2 generates all the trace level 1 information plus some additional information. Trace level 3 generates all the trace level 2 information plus a LOT of additional information, right down to the bytes going through our transport layer to and from the host.
The following sample shows how to construct iOhioSession and enable tracing for the ECLPS and DataStream components.
Properties p = new Properties(); p.put(iOhioSession.SESSION_HOST, new String("myHost")); p.put(iOhioSession.SESSION_TRACE, iOhioSession.SESSION_TRACE_PS + " " + iOhioSession.SESSION_TRACE_DATASTREAM)); iOhioSession s = new iOhioSession(p);
iOhioSession provides the following constants for the all the traceable components:
Constant |
Component Traced |
---|---|
SESSION_TRACE_SESSION | iOhioSession |
SESSION_TRACE_PS | ECLPS |
SESSION_TRACE_FIELDLIST | ECLFieldList |
SESSION_TRACE_FIELD | ECLField |
SESSION_TRACE_OIA | ECLOIA |
SESSION_TRACE_ERR | ECLErr |
SESSION_TRACE_XFER | ECLXfer |
SESSION_TRACE_OIA_EVENT | ECLOIAEvent |
SESSION_TRACE_PS_EVENT | ECLPSEvent |
SESSION_TRACE_COMM_EVENT | ECLCommEvent |
SESSION_TRACE_SD | ECLScreenDesc |
SESSION_TRACE_SCRN_RECO | ECLScreenReco |
SESSION_TRACE_PRINTER | Printer |
SESSION_TRACE_DS | Datastream |
SESSION_TRACE_TRANSPORT | Transport |
OHIOLO incorporates a presentation space debugger which can be activated programmatically by providing special parameters to the iOhioSession constructor or using the iOhioSession.ShowPSDebugger() method. The presentation space debugger provides a windowed interface which can be used to peek at the various planes which comprise the complete presentation space. It has the ability to show the text, field, color, extended field, DBCS, and grid planes.
The presentation space debugger does not allow interaction with the presentation space.
The following sample shows how to construct iOhioSession and activate the presentation space debugger.
Properties p = new Properties(); p.put(iOhioSession.SESSION_HOST, new String("myHost")); p.put(iOhioSession.SESSION_PS_DEBUGGER, ""); iOhioSession s = new iOhioSession(p);
OHIOLO applets can also be debugged using the 'Run Applet' feature within Host On-Demand or the 'Run Java Applet' feature within Personal Communications. Debugging user applets in this environment has a few advantages over the presentation space debugger. First, the emulator screen is interactive, allowing the applet developer to help the applet navigate problem screens while finding solutions to applet problems. This environment also contains the operator information area (OIA) which contains valuable information such as the cursor position and status information about the connection with and the state of the host.
The tradeoff in using the 'Run Applet' feature or the 'Run Java Applet' feature rather than the presentation space debugger is performance. Applets may run more slowly because of the additional overhead of a full function emulator.
To run applets through Host On-Demand or Personal Communications, the applet must implement Interface com.ibm.eNetwork.ECL.ECLAppletInterface. This interface provides the methods for passing the active session to the applet.
[ Top of Page | Previous Page| Next Page | Table of Contents]