You are here: Visual LANSA User Guide > 6. Debugging Applications > 6 2 Set Breakpoints

6.2 Set Breakpoints

A breakpoint tells the debugger to halt just before executing a specific line of code. Refer to 6.2.1 Breakpoints and 6.2.2 Breakpoint Properties.

You can mark breakpoints in the code at any time. The debugger does not have to be active to mark the breakpoints. The breakpoints are saved as part of the source code definition.

To set a breakpoint, put the cursor on a statement, use the Toggle Breakpoint command in the ribbon or right-click and choose Set As Breakpoint from the context menu. You can also press the F9 key. Only lines with executable commands may have breakpoints. For example, you cannot set a breakpoint on a comment line or GROUP_BY command.

You can open other objects for editing during the debug session and set breakpoints where required.

If an object is not already open in the editor and a breakpoint has been set on it, the object will be opened automatically when the breakpoint is encountered.

When you start debugging an application, the execution will stop at the statement which has the first breakpoint set. When the application is halted, you can examine the application's current state by referring to the 6.3 Variables and 6.4 Call Stack.

To continue debugging, either use the Continue Execution command (F5), or use the Step Into (F8) and Step Over (Shift + F8) commands to move forward one statement at a time.

To disable or remove breakpoints, use the Toggle Breakpoint command or the Breakpoints Toolbar in the 6.2.1 Breakpoints tab.

Also See

6.2.1 Breakpoints

6.2.2 Breakpoint Properties

6. Debugging Applications