Use step-by-step debugging

Step-by-step debugging

Debugging in step-by-step mode is supported when debugging some languages that can be debugged when they are mixed with Java. This mode offers the greatest amount of control over the debugging process, as your application stops at entry to every object loaded by the JVM or server, at which point you can step into or over and use other debugging features.

Unlike traditional stepping, which works at the statement level of the language, step-by-step mode works at a much higher level and stops on entry to every object loaded by the JVM or server. You use step-by-step mode to get to the object you want to debug and then use traditional stepping (step into, step over and step return) to control debugging at the statement level.

To determine which languages support step-by-step debugging, open the Java and Mixed Language Debug preference page. In this page, supported languages are listed for step-by-step debugging enablement.

Enabling and disabling step-by-step debug mode

Step-by-step debugging is enabled for the language that you are debugging in the debug preferences.

Once you have enabled step-by-step debugging for the language that you are debugging, you can enable step-by-step debugging mode by selecting the debug target, thread, or stack frame in the Debug view, and performing one of the following tasks:

If step-by-step debugging is enabled, you can also disable it by performing one of these steps. You can 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 or you can change the default step-by-step mode in the preferences. The default mode is applied when a new debug session is started. Once the debug session is started, you can change the mode using one of the preceding methods.

Step-by-Step Debug dialog box

If step-by-step mode is enabled, you will be prompted to debug every object that is loaded in the application that you are debugging. If step-by-step mode is disabled, the application that you are debugging will continue to run. The debugger will stop at breakpoints if step-by-step mode is enabled or disabled.

If step-by-step filters are being applied, the debugger will stop according to the step-by-step filter settings that are set in the debug preferences for the language that you are debugging.

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:

Web Objects

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:

Web Object Filters

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.

Professional hosting     Belorussian informational portal         Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free SCJP 5.0 (Tiger) Study Guide     Free Mock Exam Engine     Free SCWCD 1.4 Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide