Generating the Class Trace (Integrated Debugger)

The debugger will generate a trace of class loading and initialization, if you enable the Class Trace option.  The class trace is useful for determining which classes your program uses, and can help in debugging.

To turn the trace on:

  1. Select Options from the Window menu.
  2. Select the Debugging page.
  3. Enable the Trace class initialization for running programs checkbox.
  4. Click OK.

Note: When this option is enabled, some processing time is required to compute and store the trace.  As a result, the program may run significantly more slowly when this option is enabled.

To see the trace:

  1. Open the Debugger browser by selecting Debug > Debugger from the Window menu.
  2. In the Workbench or a browser, start a program running.
  3. While the program is running, select the program (not a thread) in the All Programs/Threads pane.
  4. The trace will be shown in the Source pane.  Copy the contents to the clipboard to save them.

As soon as the program terminates, the trace will disappear from the Source pane.   If your program runs quickly, you may want to add a breakpoint near the end of the program's code so that the program will stay in the debugger's list of active programs long enough for you to view the trace.

Example: Generate the Class Trace for Hanoi

ngrelc.gif (533 bytes)
The Integrated Debugger

ngrelt.gif (466 bytes)
Debugging During the Development Cycle
Setting Breakpoints in Source Code
Setting Debugger Options