Breakpoints window

BASin

Breakpoints window

The Breakpoints window is available from the View menu.

Breakpoints window

The breakpoints window lists every breakpoint that the user has set within the program, along with some other information which can be useful when debugging. The list has a small column to the left, which contains a checkbox. When checked, this means that the breakpoint is active. When unchecked, the breakpoint will be ignored and won't suspend program operation. This option can also be set from the context menu activated by right-clicking a breakpoint in the list. After this, the line and statement is listed, in the Line:Statement format (i.e., 10:1 would be line ten, statement 1), along with the source of the line in BASIC code. Any condition that has been set for the breakpoint is listed next to this.

Conditional breakpoints must have their conditions attached using the Breakpoint Properties Window after the breakpoint has been created. This condition is an expression which must evaluate to a numerical result. Whenever program execution reaches the line and statement specified for this breakpoint, the condition (if present) is evaluated. If the result is non-zero, then the breakpoint will suspend program operation and return you to the editor. A result of zero will allow the program to skip the breakpoint, and continue execution.

Finally, to the far right, is the Pass Count. This number will be incremented when program execution reaches the breakpoint, regardless of whether or not execution is suspended by the breakpoint. By watching this value rise, you can see if your program is executing that line of code, and how often.

You can add a new breakpoint by either choosing the "Add Breakpoint…" menu item (after clicking your right mouse button in the breakpoints list), or by using the "Add New…" button. A new breakpoint will be created, and the Breakpoint Properties Windowl open allowing you to edit the new breakpoint's attributes. You can also call up the properties for any other breakpoint by either using the "Properties" button, or by using the "Properties" option on that breakpoint's context menu.

breakpoints can be deleted by highlighting a breakpoint in the main list, and either using the "Delete" option on the context (right-click) menu, or by using the "Delete" button.

The context menu for the main list has extra functionality if no breakpoint is highlighted, and will allow you to enable, disable or delete all the breakpoints in the list. These items should be used with care, as they can easily make a mess of all your debugging efforts so far. When a breakpoint is highlighted, then an extra option appears on the menu - "View Source", which will move the Editor cursor to the start of the line and statement that the breakpoint refers to.