30.4 Software Breakpoints
debugWIRE supports the breakpoint functions in program memory by the AVR BREAK instruction. Setting a breakpoint in Atmel Studio will insert a BREAK instruction in the program memory. The instruction replaced by the BREAK instruction will be stored. When program execution is continued, the stored instruction will be executed before continuing from the program memory. A break can be inserted manually by putting the BREAK instruction in the program.
The Flash must be re-programmed each time when a breakpoint is changed. This is automatically handled by Atmel Studio through the debugWIRE interface. The use of breakpoints will, therefore, reduce the Flash data retention. Devices used for debugging purposes should not be shipped to end customers.