4.7.1.3.2 Hardware or Software Breakpoint Selection
Hardware breakpoints are used by default. To enable software breakpoints:
- Open your project folder in VS Code with installed MPLAB for VS Code extensions.
- Ensure the hardware tool has been specified in your project
mplap.jsonfile. - In the command palette enter
MPLAB: Edit project properties (UI). When the window opens, scroll to the Tool section. - Scroll to Debug Options and check Use software breakpoints to use software breakpoints. Uncheck to use hardware breakpoints.
Note: Using software breakpoints for debug impacts device endurance. Therefore, it is
recommended that devices used in this manner not be used as production parts.
To help you decide which type of breakpoints to use (hardware or software) the following table compares the features of each.
| Feature | Hardware Breakpoints | Software Breakpoints |
|---|---|---|
| Number of breakpoints | Limited | Unlimited |
| Breakpoints written to* | Internal debug registers | Flash Program Memory |
| Breakpoints applied to** | Program Memory/Data Memory | Program Memory only |
| Time to set breakpoints | Minimal | Dependent on oscillator speed, time to program Flash Memory and page size. |
| * Where information about the breakpoint is written in the device. | ||
| ** What kind of device feature applies to the breakpoint. This is where the breakpoint is set. | ||
