Setting a line breakpoint

Line breakpoints are set on an executable line of a program.

To add a line breakpoint, do the following:

    In the editor area, open the file where you want to add the breakpoint. Do one of the following:

    • Right-click the marker bar (the vertical bar to the left of the main text area) directly to the left of the line where you want to add the breakpoint and select Toggle Breakpoints from the pop-up menu.

    • Double-click the marker bar directly to the left of the line where you want to add the breakpoint.

    Note: If a breakpoint is already set on a line, choosing Toggle Breakpoints will remove the breakpoint. A new line breakpoint marker appears in both the Breakpoints view and on the marker bar (directly to the left of the line where you added the breakpoint).

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 frame on that thread's stack. The line where the breakpoint was set is highlighted in the editor.

Line breakpoints that are set in source outside of the workspace

When you are debugging Web pages that link to a page outside of the workbench workspace, or if the page is deployed through a Web server, the filename of the linked-to source cannot be determined by the debugger. The debugger will treat this source as temporary - valid only as long as the page is open in the browser. A source file (with filename based on the URL of the page) will be created by the debugger, and this source will be cached until you navigate away from the page in the browser. If you set a breakpoint in this source, it will remain active in the source and be displayed in the Breakpoints view only while the cached source remains. When the page is no longer in the browser, the breakpoint will be deleted and it will no longer appear in the Breakpoints view. While these non-persistent breakpoints are active in the Breakpoints view, they are indicated with an asterisk (*). When you view the properties of these breakpoints, they are labelled as not persistent (where persistent breakpoints are set in source that is located in the workspace and remain until you remove them).

 

Related concepts

Breakpoints

 

Related tasks

Using breakpoints
Enabling and disabling breakpoints
Removing breakpoints
Setting a line breakpoint
Editing and viewing source while debugging
Halting a running program