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.

About this task

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

About this task

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:

Procedure

  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

About this task

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:

Procedure

  1. 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.
  2. A step-by-step element is disabled (grayed out) if the corresponding language element is disabled. To enable such step-by-step element, enable the language element first.

Step Filtering

About this task

In the Preferences dialog box, selecting Run/Debug > Java and Mixed Language Debug > Step Filtering will open the Step Filtering page. In this page, you can set Java step filter preferences, and step-by-step filter preferences for Web objects.

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 filtering can be turned on by selecting the Use step filtering check box.

Step-by-step filters are applied when debugging Web objects. The debugger will not stop at objects that are filtered out. To enable step-by-step debugging for Web objects, select the check box next to the Web Objects element in the Java and Mixed Language Debug preference page.

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

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. You can also disable step-by-step mode for the current debug session by selecting the Disable step-by-step mode check box when the Step-by-Step Debug dialog box appears while debugging.

WebSphere Runtime libraries are always active regardless of step-by-step filter or step filter settings. To avoid debugging runtime libraries, you can use runtime filters. Runtime filters cannot be added or removed. To disable the filtering of runtime packages, deselect the filters under the WebSphere Runtime filters list.

In the Step Filtering page, you can add and remove filters, as follows:

Procedure

  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.
    Note: Newly added filter will be enabled for step filter and disabled for step-by-step filter by default.
  2. To have the debugger recognize a class as a filter, click Add Class and complete the resulting dialog box.
  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.

Results

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 filters can only be enabled/disabled when the Use step filtering check box is selected.

Thread Filters

About this task

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