Setting debug preferences

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. For further information about locating source, see the related topic below.

Preferences for debugging WebSphere Application Server and Java and mixed languages include specifying source lookup behavior, enabling step-by-step debug mode, 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

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

    To enable mixed language debugging, select the Enable mixed language debugging check box. By default, this check box is selected. 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.
    Tip: The list of languages in this section represent the languages in this product that are available for debugging mixed with Java.

Step-by-step debugging

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:

    If you would like 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 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 may be available through the Settings push button.

Enabling step-by-step debugging for Web objects

To enable step-by-step debugging for Web objects, select the check box next to the Web Objects element. If you would like 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, 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.

Step Filters

Step filters allow you to avoid debugging internal WebSphere Application Server methods, so that you only debug your application. You can also filter out any other external packages that you do not want to debug. 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 (described above).

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.

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.

 

Related tasks

Enabling and disabling step-by-step debug mode
Stepping into methods
Finding source
Creating a new Java and mixed language debug launch configuration