Breakpoint Conditional Expressions
What Breakpoints Conditional Expressions Can be Used For
You can specify, which information from your program (values of variables
etc.) shall be transmitted to Visual Micro when the breakpoint is hit.
This can be a fixed text as well as values of variables. You can also change the
variable's values on your PC and then can instruct the board to continue
executing while using the new variable value.
After making changes to your breakpoint
as shown here, you
must recompile and upload
your sketch in order for the changes to go into
How to Create a Breakpoint With a Conditional
Read on the general Breakpoints documentation page on how to set breakpoints.
To make a breakpoint conditional, right click the
marker of an existing breakpoint at the left of your code, and choose "Conditions...":
or click on the
that appears when you mouse cursor hovers over the red
An new window appears, showing these text fields::
First you choose what mode of conditional expression you want to use.
A Conditional expressions
"Conditional expression" lets you check an expression.
Enter the expression in field
exp . You can use variables from your sketch in the expression, e.g. "inputVoltage > 100"
assuming "inputVoltage" is one of your variables. Any expression that is valid at the code location of your breakpoint can be used, including function calls,
for example: "myFunction(analogRead(SIGNAL_PIN)) > limit[i]"
Choose either "Is true" or "When changed".
- With "Is true", the breakpoint will become effective
if the condition is true, e.g. if "inputVoltage" is greater than
- With "When changed", the breakpoint will become effective
if the given expression's result has changed since the last time the
breakpoint was passed. "Has Changed" also makes
sense without a comparison (>,<,==, etc.), for example, if your
expression is "inputVoltage", then the breakpoint halts, if the
inputVoltage has changed since the last time the breakpoint was passed.
Read on this page dedicated to Hit Counters.
Filters cannot be used with Visual Micro, they are reserved for development using Visual Studio alone.