Working with Breakpoints in Visual Micro
Any changes to breakpoints require the project to be built and uploaded to your board again, before they take effect.
The following chapter describes what you can do with breakpoints.
For general information about debugging, read the chapter "Debugging
your sketch" first.
To set a breakpoint at a specific line of your code:
- Put the cursor on an instruction in your program
code
- Press [F9].
-or-
click on the gray sidebar left of the code:
You can use your new breakpoint as-is, or you can edit it's properties so that it can serve special purposes in your debugging task.
The rest of this page describes how to use breakpoint properties.
All breakpoint properties can be edited by using the
icon in the context menu
that appears when you hover your mouse over the red breakpoint marker to the left of your
code in the code window:
A popup window will appear, that has two checkboxes, "Conditions" and
"Actions":
1
"Conditions": If you
check this box, more elements will appear, they let you specify
a condition under which the breakpoints becomes active. The
breakpoint is only active, if the If the condition is met at the
time the code passes the breakpoint.
Click here to read about
breakpoint conditions
By clicking on ,
you can create additional conditions.
2
"Actions": If you
check this box, more elements will appear, and you can specify a
message text that shall be shown in the output window if the
breakpoint is hit. This may seem unremarkable, but this function
offers a whole set of debugging options, far beyond simple text
output
Click here to read about
breakpoint actions
Of course, you can combine "Conditions" and "Actions" by checking both checkboxes.
If you have accidently deleted a breakpoint, then
you can recover it by using Edit > Undo function from
the menu (or [Ctrl+Z]).
You can leave the breakpoint configuration window open at any time while debugging or editing code.
If you click on this text on top of the breakpoint
window:
then you can move the breakpoint with all its settings to a new line
number: