Home

 

Working with breakpoints

To enable a breakpoint in the code, double-click in the grey area of the left frame (or use the context menu on the left side of the frame) for the line of code the breakpoint is required for. To remove it, double-click it again, and to disable the breakpoint, right-click and select Disable Breakpoint.

Alternatively, after they have been created, the breakpoints can be enabled and disabled from the Breakpoints view (Figure | 4-12). If the breakpoint is un-selected in the Breakpoints view, it is skipped during execution.

To disable or enable all breakpoints, click the Skip All Breakpoints icon. If this option is selected, then all breakpoints are skipped during execution.

Figure 24-12 Enabling/Disabling Breakpoints

It is possible to export a set of breakpoints, including the conditions and hit count properties so that they can be shared across a development team. To do this, from the context menu of the Breakpoints view, select Export Breakpoints, and the breakpoints are saved as a bkpt file to the selected location.

Before continuing with debugging of JSPs, do the following steps:

Remove the breakpoints by clicking the Remove All Breakpoints icon .

Click Resume to continue execution.

Note that you do not see the Web page automatically in the Debug perspective. Click the view with the World icon (in the same pane as the source code) to see the resulting Web page. Alternatively, switch to the Web perspective.

If you waited too long, the thread has been terminated in the server and you have to restart the application from the index.jsp.

Tip: Java exception breakpoints are a different kind of breakpoint that are triggered when a particular exception is thrown. These breakpoints can be set by selecting Run Æ Add Java Exception Breakpoint.

ibm.com/redbooks