To debug business objects, servlets, or EJBs using Object Level Trace, complete the following steps. You should already have created a trace (by running OLT in trace-only mode) and set method breakpoints on the trace:
If you intend to interact with the Debugger interface on this same workstation, proceed to step 2.
If you prefer to interact with the Debugger on the client workstation, or another remote machine, follow the instructions in the topic "Debugging from a remote workstation".
C++ client application:
Start your C++ application from a command prompt.
Alternatively, if the OLT
viewer is running on your client machine, you can start the application from OLT by
selecting File>Start process. The Start Process dialog box maintains a
list of previously run applications, making it easier to run your application a second
time.
Java client application:
At a command prompt, enter the java command that is appropriate for the level of JDK of
the client application:
If you do not check this box, a dialog box opens when the next client application attempts to register with OLT. To use the same settings, click Run. To change the settings for the application, click Change settings and do the following on the Client Controller page:
The client application is now registered with OLT.
As your application runs, trace lines and symbols are added to the OLT viewer. When OLT encounters a method breakpoint, the Debugger automatically attaches to the process and finds the method on which you set the breakpoint. At the same time, the Debugger interface opens on the workstation where the Debugger daemon is running.
Once you have stepped through the object method call, servlet, or EJB, your application runs until the next method breakpoint, or the end of the program, is reached. Alternatively, you can step the Debugger out of the server-side function and into your client code. This opens a second Debugger pane, which points to the client code, immediately past the server call. Thus, you are able to debug both server and client seamlessly, as if they were one application.
While the Debugger is open, it is in complete control of the application server. Any other OLT sessions tracing on the application server will be suspended. Also, new OLT sessions will not be able to connect to the application server.
Location of source code
Before starting your application server or servlet, set the DER_DBG_PATH environment
variable on your server or client workstation. The Debugger uses this environment variable
to locate source files for your client application.
When debugging Java classes, make sure that any source files for your classes are accessible from the system CLASSPATH environment variable. That is, if the source for my.package.MyClass resides in x:\source\my\package\MyClass.java, you must add x:\source to the CLASSPATH. Otherwise, you will not be able to view the source.
On the AS/400, you must add the -classpath
option to the arguments in the Command line arguments field on the General
page of the WebSphere Application Server Administrative Console. For example if you want
to debug the com.mycompany.mybeans.AccountBean class, and the debuggable version of the
AccountBean class resides in directory /QIBM/UserData/WebASadv/enterprisebeans/com/mycompany/mybeans,
specify -classpath /QIBM/UserData/WebASadv/enterprisebeans.
While debugging a C++
business object, do not close the Debugger window. Doing so shuts down the application
server (this is a Windows NT/2000 limitation only). When you finish debugging, stop your
application server using System Manager, then close the OLT (which also closes the
Debugger windows).
Multi-programmer support
How to read the trace
Tracing a distributed application
Setting method breakpoints on the trace
Debugging from a remote workstation
Debugging client applications from startup
OLT troubleshooting
Java commands for tracing and debugging
WebSphere Advanced and Advanced Single Server Edition examples
Component Broker Object Level Trace examples