Setting debug preferences

When you are debugging J2EE or Web applications, you can set preferences for mixed language and step-by-step debugging - and you can set step and thread filters.
Note: In the Java and Mixed Language Debug preference page, the Performance section (Stop at the first file name match when search for source check box) is deprecated and replaced by the Search for duplicate source files on the path check box in the Edit Source Lookup Path dialog box. For further information about locating source, see the related topic.

Preferences for debugging Java™ and mixed languages and WebSphere® Application Server include mixed language debugging enablement, step-by-step debug mode enablement, and setting step and step-by-step filters (which are lists of packages, classes, etc. that you do not want to stop in when stepping or debugging in step-by-step mode).

Selecting Window > Preferences from the workbench menu bar opens the Preferences dialog box. In this dialog box, you can choose the Run/Debug node to set a variety of debug preferences for your Java debug session. In addition, you can set the following preferences for debugging Java and mixed languages - and Web objects and other elements that are running on a WebSphere Application Server:

Mixed Language Debug

Note: This preference section is not available if you have installed this debug functionality with the IBM® WebSphere Application Server Toolkit.
Tip: The list of languages in this section represent the languages in this product that are available for debugging mixed with Java.

In the Java and Mixed Language Debug preference page, you can set mixed language debug preferences in the Mixed Language Debug section, as follows:

  1. To enable mixed language debugging, select the Enable mixed language debugging check box. By default, this check box is selected.
  2. In addition to selecting the Enable mixed language debugging check box, you need to choose the language(s) for which you want mixed language debugging to be enabled. To enable mixed language debugging for any of the languages listed in the Mixed Language Debug section, select the check box next to the language. To enable all languages, click the Enable All push button. To disable all languages, click the Disable All push button.

Step-by-step debugging

Tip: The list of languages in this section represent the languages in this product that are available for step-by-step debug enablement.

In the Java and Mixed Language Debug preference page, you can set step-by-step debug preferences in the Step-by-Step section, as follows:

  1. If you want to use step-by-step debug mode by default when you launch a debug session, select the Enable step-by-step debug mode by default check box.
    Note: You can also disable step-by-step mode for the current debug session by selecting the Disable step-by-step mode check box in the Step-by-Step Debug dialog box.
  2. To enable step-by-step debugging for any of the elements listed in the Step-by-Step section, select the check box next to the element. To enable all elements, click the Enable All push button. To disable all elements, click the Disable All push button.

    When an element is selected, further settings for the step-by-step behavior of the element might be available through the Settings push button.

Enabling step-by-step debugging for Web objects

If step-by-step filters are being applied when debugging Web objects, the debugger will stop at every object that is not filtered out. To enable step-by-step debugging for Web objects, select the check box next to the Web Objects element. If you want to apply filters when a Web object that you can step into is loaded, select the Web Objects element and then click the Settings push button. This will open the Web Object Filters dialog box. In this dialog box, selecting the Apply filters check box enables Web object filtering. When this check box is selected, you can add and remove filters as follows:

  1. To have the debugger recognize a string as a filter, click Add Filter and enter the filter (a class or a package that you enter directly) in the dialog box.
  2. To have the debugger recognize a class as a filter, click Add Class and complete the resulting dialog box. If the class for a Web object is filtered, the debugger will not stop in it. Rather, the debugger will behave as if step-by-step mode is not enabled for the Web object.
  3. To have the debugger recognize a package as a filter, click Add Package and complete the resulting dialog box.
  4. To remove a filter, select it and then click Remove.

To temporarily disable a defined filter, deselect its check box. Or, to disable all defined filters, click Disable All. To enable a filter that you have disabled, select its check box - or click Enable All to enable all filters.

Note: Step-by-step debugging for Web objects is only supported when debugging WebSphere Application Server.

Step Filters

In the Preferences dialog box, selecting Run/Debug > Java and Mixed Language Debug > Step Filters will open the Step Filters page. In this page, you can set Java step filter preferences.

With step filters, you can avoid debugging external packages that your code depends on, so that you only debug your application. The step filters affect step into and step return - and are independent of the step-by-step filters. Step filters are set in the same manner as WebSphere Application Server Debug step-by-step filters (as previously described).

Thread Filters

In the Preferences dialog box, selecting Run/Debug > Java and Mixed Language Debug > Thread Filters will open the Thread Filters page. In this page, you can set Java thread filter preferences.

To filter Java threads from the Debug view, select the Apply thread filters and Java Threads check boxes. When Java threads are filtered, they will not show up in the Debug view unless a debug event (for example, a breakpoint) occurs within them.


Feedback