What are Breakpoints?
Breakpoints direct the debugger to pause the execution of a program at a certain point in the code or on the occurrence of a certain condition. During this suspended state, the program is said to be in break mode. Entering the break mode does not terminate the execution of your program. You can resume the execution at any time by single stepping through the lines of code or running the program from breakpoint to breakpoint using the Continue command.
In the break mode all variables and functions remain in the memory. This enables you to examine their values to determine the possible errors in the program.
You can set the following types of breakpoints in SKILL IDE:
-
Line breakpoints
A line breakpoint is triggered when the line it is set on is reached. -
Function breakpoints
A function breakpoint is triggered when the function it is applied to is entered or exited, depending on how you configure the breakpoint. Program execution in this case pauses when the function is called or when it returns control.
Unconditional and Conditional Breakpoints
Unconditional breakpoints cause the debugger to pause the program execution at a given line of code.
To add flexibility, you can set conditions on breakpoints, such that the program execution pauses only when the breakpoint condition is satisfied. Such breakpoints are called conditional breakpoints.
By using conditional breakpoints, you can stop the code execution on specific lines of code, at the entry points of functions, on call returns, or on both. In conditional breakpoints, you define a condition—an expression that returns a logical value, for example, i==10. This condition is evaluated every time that breakpoint is reached. If the condition is satisfied, program execution pauses.
The following operators can be used to construct conditional expressions:
Related Topics
Configuration of Conditional Breakpoints
Setting Unconditional Breakpoints
Setting Conditional Breakpoints
Return to top