A breakpoint can be set on an executable line of a program. If the breakpoint is enabled when you debug, the execution suspends before that line of code executes. Once execution halts, you can examine your program's current state and check register and variable values. You can also change these values and alter the flow of normal program execution.
| Type of breakpoint | Description | Enabled State | Disabled State |
|---|---|---|---|
| Regular |
Regular breakpoint can be hardware or software. There is restriction on the number of hardware breakpoints in a project. Software breakpoints are implemented by replacing some code in the target with special opcodes. These opcodes stop the core as soon as they are executed. Software breakpoints only work if the code is running out of RAM. There is no restriction on the number of software breakpoints in a project. A dot icon is displayed in the marker bar and in the Breakpoints view, along with the name of the associated file. |
|
|
| Hardware | Hardware breakpoints are implemented by the processor hardware. The number of hardware breakpoints available varies by processor type | ![]() |
![]() |
| Temporary | Breakpoint halts the program execution and then removes the breakpoint that caused the halt. | ![]() |
![]() |
| Hardware Temporary | Hardware breakpoint, halts the program execution and then removes the breakpoint | ![]() |
![]() |
Breakpoints have enabled and disabled states. The following table defines these states.
| State | Description |
|---|---|
| Enabled | Indicates that the breakpoint is currently enabled. The debugger halts the program execution at an enabled breakpoint, the execution suspends before that line of code executes. Click the icon to disable the breakpoint |
| Disabled | Indicates that the breakpoint is currently disabled. The debugger does not halt program execution at a disabled breakpoint. Click the icon to enable the breakpoint |