Working with Breakpoints

Non-VS2015 Logos
This version of the documentation page applies to Visual Studio prior to VS2015 and to all versions of Atmel Studio.
Read documentation page for Visual Studio 2015 here.

Note IconNote:

 Visual Micro Pro including the debugger is available in a 30 days trial period after installation.
After the trial period, you can buy the Visual Micro Pro Version for a low price. Read more


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


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 context menu that appears when you right click the breakpoint marker Breakpoint Indicator to the left of your code in the code window:

Breakpoint Mouse Click


The main elements of this context menu are:

Breakpoint Context Menu

Note IconTip:

If you are about to experiment with breakpoints, start with the "When Hit..." function 5

"Delete Breakpoint": Deletes the breakpoint permanently
(Read about deleting breakpoints)
"Enable Breakpoint"/"Disable Breakpoint": Enables/Disables the breakpoint.
If disabled, the breakpoints still exists, but has no effect
(Read about Enabling/Disabling breakpoints)
"Condition...": Used to create breakpoint that are only effective if a condition is met
(Read about conditional breakpoints)
"Hit Count...": Used to create breakpoint that are activated by a hit counter
Use breakpoint with hit counters if you want that your breakpoints halts the execution of your program not before the program has passed it n times, or you want the breakpoint to become effective every n milliseconds.
(Read about breakpoint counters)
"When Hit...": Controls what happens when a breakpoint is hit
You can show text, and values of variables, and can even the values of variables on the board from your PC
(Read about breakpoint "When Hit" actions)

Other Pages