Tutorials
WebSphereIn this tutorial you will learn about WebSphere V5.0 : Debugging - Set breakpoints, Adding breakpoints, Enabling and disabling breakpoints, Editing breakpoint properties, Applying hit counts and Managing conditional breakpoints.
Line breakpoints are set on an executable line of a program.
1. In the editor area, open the file where you want to add the breakpoint.
.
2. Directly to the left of the line where you want to add the breakpoint, double-click the marker bar directly to the left of the line where you want to add the breakpoint or open the marker bar pop-up menu and select Add Breakpoint:

A new breakpoint marker appears on the marker bar, directly to the left of the line where you added the breakpoint.

Also, the new breakpoint appears in the Breakpoints view list.

While the breakpoint is enabled, thread execution suspends before that line of code is executed. The debugger selects the thread that has suspended and displays the stack frames on that thread's stack. The line where the breakpoint was set is highlighted in the editor in the Debug perspective.

Do one of the following sets of tasks:

OR
If the breakpoint is enabled, its image will be a blue circle and if it is disabled the image will be a white circle:

While the breakpoint is enabled, thread execution suspends before that line of code is executed. The debugger selects the thread that has suspended and displays the stack frames on that thread's stack. The line where the breakpoint was set is highlighted in the editor in the Debug perspective.
You can edit the following properties of line, address, watch, load, and entry breakpoints:
To change a breakpoint's properties:
In the Breakpoints view, right-click on the breakpoint you want to modify.
Select Properties... from the pop-up menu. The Breakpoint Properties dialog corresponding to the breakpoint type appears displaying the current settings for the breakpoint.

3. When you have made all desired changes, click Ok.
A hit count can be applied to line breakpoints, exception breakpoints, watchpoints and method breakpoints. When a hit count is applied to a breakpoint, the breakpoint suspends execution of a thread the n-th time it is hit, but never again, until it is re-enabled or the hit count is changed or disabled.

3. In the Set Breakpoint Hit Count field, type the number of times you want to hit the breakpoint before suspending execution.

NOTE: When the breakpoint is hit for the n-th time, the thread that hit the breakpoint suspends. The breakpoint is disabled until either it is re-enabled or its hit count is changed.
To set a condition on a breakpoint:
1. Do one of the following sets of tasks:
2. The Breakpoint Properties dialog will open.
3. In the properties dialog, check the Enable Condition checkbox. To disable the condition, uncheck this checkbox.
4. In the Condition field enter the boolean expression for the breakpoint condition.

5. Click Ok to close the dialog and commit the changes.
While the breakpoint is enabled, thread execution suspends before that line of code is executed if the breakpoint condition evaluates to true. The debugger selects the thread that has suspended and displays the stack frames on that thread's stack. The line where the breakpoint was set is highlighted in the editor in the Debug perspective.

A conditional breakpoint has a question mark overlay on the breakpoint icon.
_________________
Author: Mikalai Zaikin. Please Click Here to visit Authors site for any updates and changes to the study notes.