Edit and debug 100's of arduino boards and 1000's of libraries. Uses the same configuration as the arduino ide (+ advanced mode). Supports all past and current versions of arduino.cc, arduino.org and all compatibles. Hardware and Software Debugging (usb, jtag, ice etc.), serial monitors, local libraries and much more. Also supports Atmel Studio.

Breakpoint Conditional Expressions

This version of the documentation page applies only to Visual Studio 2015
Read documentation page for other VS versions and Atmel Studio here.

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.

Note

After making changes to your breakpoint
as shown here, you
must recompile and upload your sketch in order for the changes to go into
effect.

How to Create a Breakpoint With a Conditional
Expression

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
icon,
that appears when you mouse cursor hovers over the red
breakpoint marker.

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]"

1 and 2:

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
100.

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.