Controlling Which Classes are Traced Into

Normally, you should set the tracing include and exclude lists in the project properties before you start debugging. However, if you need to change the tracing include and exclude lists, you can do so from the Classes window. Right-click in the Classes window and choose Tracing from the context menu. The Tracing dialog appears in which you can adjust the tracing include and exclude lists

When you specify a package to be included or excluded from tracing, all descending classes within that package are included or excluded as well unless you've specified them individually.

To closely examine part of your program, you can enable tracing on only the files you want to step through in the debugger. For example, you usually don't want to step through classes that are in the J2SE library because you're not going to troubleshoot on them; you usually only want to trace into your own classes.

Stepping Behavior as Guided by Tracing Lists

If you exclude a class or package, and you instruct the debugger to step into that class, the debugger runs straight through that code without pausing. The debugger pauses at the next line of code in a class which has not been excluded. The tracing include and exclude lists are used for all step commands including Step Into, Step Over, Step Out, and so on. Using these lists do not prevent you from setting a breakpoint in a class which has been excluded. If the debugger stops at such a breakpoint, the step commands will be disabled.

To enable tracing for a class, you can adjust the tracing include or exclude list by adding or removing a class or package:

  1. Right-click a project_icon project in the Navigator and choose P roject Properties from the context menu.
    The Project Properties dialog appears.
  2. Expand the Debugger node and click Tracing.
  3. In the Tracing Class and Package Exclude List parameter, enter the name of the packages or classes you want to include or exclude in the appropriate field, separated by a semicolon (;) or click Edit.
    The Tracing Class and Package Exclude List dialog appears.
  4. Click Add or Remove .
  5. Navigate to the class or package you want to add and click OK.
    The class or package is added to the appropriate tracing List.

By leaving the include lists blank, you are actually specifying that you would like to enable tracing in all packages except for those specifically listed in the exclude list. For example:

include:
exclude:java;javax

Press F1 in the Classes window for more information.


Related topics

Using the Classes Window
Moving Through Code While Debugging
Using the Source Editor When Debugging