user28657: Breakpoints are a great way to see how the compiler runs to your code. Now my question is, is there a possibility to use breakpoints when you debug your code?

user4143: Not in the Arduino IDE.
You need to:

Install and use a real IDE, such as Atmel Studio, and
Use a full hardware debugger

There is no provision for debugging through the UART/USB interface using the bootloader.

user18478: Though Majenko his answer is correct there are some other options.
As to the real hardware debugging as stated by majenko I would say:

Install and use a real IDE, such as Atmel Studio or the arduino eclipse plugin called sloeber (I'm author), and  
Use a full hardware debugger or hardware that has it on board like the Arduio zero or hardware using other debugging technology like the ESP8266 that allows USB debugging  

An other debugging option from a completely different category is to organize your code so that decision logic (hardware independent) and action (hardware dependent ) are completely separated.   
Then compile your sketch as a local program and debug the "decision logic" on your local machine. This method does not allow for "hardware debugging". This method also enables unit testing.
Note that your local machine is probably a 32 or 64 bitter and most Arduino's are 8 bitters which will result in differences in data types which is an extra attention point when using this method.

user13432: The Arduino-Debug library provides a simple on-target debugger for Arduino sketches. Debug command are added directly to the sketch. A debugger command shell is started on break-points and assertions. 

The screen-shot above shows the example sketch run on an Arduino Mega with Serial output monitor used by application and Serial1 used for the debugger shell. 
Sketch Debug Commands

ASSERT(cond)     Check assert condition. If false the debug shell is
called. The sketch cannot continue. 
BREAKPOINT()     The debug shell is called.  
BREAK_IF(cond)   The debug
shell is called if the condition is true.  
CHECK_STACK(room)    Check
that there is room (bytes) on the stack. If false the debug shell is
called.  
DEBUG_STREAM(dev)    Use the given stream device for debug session. Typically Serial.
OBSERVE(expr)    Print the expression to the debug stream.
OBSERVE_IF(cond,expr)    Print the expression to the debug stream if
the condition is true. 
REGISTER(var)    Register a variable for access
from the debug shell. Debug Shell Commands

Debug Shell Commands

?VARIABLE  Print variable address and value.
@VARIABLE  Print pointer variable address and reference value.
backtrace  Print simple call-stack.
commands   Print list of commands (see also help).
data   Print contents of data area, i.e. global variables. 
go     Leave debug shell and continue execution of sketch. 
heap   Print contents of heap, i.e. dynamic allocated data. 
help   Print list of commands.
memory Print memory status.
quit   Stop sketch. 
stack  Print contents of stack, i.e. call frames, arguments, return addresses.
variables  Print list of registered variables.
where  Print source code file and line where debug shell was called.

All debug shell commands can be abbreviated to single character commands. Please see the README for further details; installation details, example sketch and benchmarking. 

user3917: As noted in Majenko's answer, the Arduino IDE doesn't provide a breakpoint  mechanism but Atmel Studio does support breakpoints.[*]
However, if you have a switch and an LED, you can track the progress of your program in a way that provides some of the benefits of breakpoints.  You would add a subroutine, say BPReport(), that via serial output or an LCD reports values of critical variables, then lights the LED and waits until the switch has been pressed and released, with debounce.  Call your BPReport() routine whereever you want an unconditional breakpoint.  For conditional breakpoints, you can have a routine BPReportIf(cond) which calls  BPReport() if cond is true.  If you don't want to output via serial, you might use several LEDs or an LCD, and you might use several switches if you want external break controls (for example, cond could be a test of one of the extra switches).
[*] Some hardware debuggers modify downloaded code each time breakpoints are added, changed, or removed.  That usage will wear out flash memory more rapidly than just occasionally downloading to it.  If a chip has been heavily used for such debugging, don't use that chip in a production system.

28657: <p>Breakpoints are a great way to see how the compiler runs to your code. Now my question is, is there a possibility to use breakpoints when you debug your code?</p>
 4143: <p>Not in the Arduino IDE.</p>

<p>You need to:</p>

<ol>
<li>Install and use a real IDE, such as Atmel Studio, and</li>
<li>Use a full hardware debugger</li>
</ol>

<p>There is no provision for debugging through the UART/USB interface using the bootloader.</p>
 18478: <p>Though Majenko his answer is correct there are some other options.</p>

<p>As to the real hardware debugging as stated by majenko I would say:</p>

<ol>
<li>Install and use a real IDE, such as Atmel Studio or the arduino eclipse plugin called sloeber (I'm author), and  </li>
<li>Use a full hardware debugger or hardware that has it on board like the Arduio zero or hardware using other debugging technology like the ESP8266 that allows USB debugging  </li>
</ol>

<p>An other debugging option from a completely different category is to organize your code so that decision logic (hardware independent) and action (hardware dependent ) are completely separated.   </p>

<p>Then compile your sketch as a local program and debug the "decision logic" on your local machine. This method does not allow for "hardware debugging". This method also enables unit testing.</p>

<p>Note that your local machine is probably a 32 or 64 bitter and most Arduino's are 8 bitters which will result in differences in data types which is an extra attention point when using this method.</p>
 13432: <p>The <a href="https://github.com/mikaelpatel/Arduino-Debug" rel="nofollow noreferrer">Arduino-Debug</a> library provides a simple on-target debugger for Arduino sketches. Debug command are added directly to the sketch. A debugger command shell is started on break-points and assertions. </p>

<p><a href="https://i.stack.imgur.com/KAVaa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KAVaa.png" alt="enter image description here"></a></p>

<p>The screen-shot above shows the <a href="https://github.com/mikaelpatel/Arduino-Debug/blob/master/examples/DebugDemo/DebugDemo.ino" rel="nofollow noreferrer">example sketch</a> run on an Arduino Mega with Serial output monitor used by application and Serial1 used for the debugger shell. </p>

<p><strong>Sketch Debug Commands</strong></p>

<ul>
<li>ASSERT(cond)     Check assert condition. If false the debug shell is
called. The sketch cannot continue. </li>
<li>BREAKPOINT()     The debug shell is called.  </li>
<li>BREAK_IF(cond)   The debug
shell is called if the condition is true.  </li>
<li>CHECK_STACK(room)    Check
that there is room (bytes) on the stack. If false the debug shell is
called.  </li>
<li>DEBUG_STREAM(dev)    Use the given stream device for debug session. Typically Serial.</li>
<li>OBSERVE(expr)    Print the expression to the debug stream.</li>
<li>OBSERVE_IF(cond,expr)    Print the expression to the debug stream if
the condition is true. </li>
<li>REGISTER(var)    Register a variable for access
from the debug shell. Debug Shell Commands</li>
</ul>

<p><strong>Debug Shell Commands</strong></p>

<ul>
<li><em>?VARIABLE</em>  Print variable address and value.</li>
<li><em>@VARIABLE</em>  Print pointer variable address and reference value.</li>
<li><em>backtrace</em>  Print simple call-stack.</li>
<li><em>commands</em>   Print list of commands (see also help).</li>
<li><em>data</em>   Print contents of data area, i.e. global variables. </li>
<li><em>go</em>     Leave debug shell and continue execution of sketch. </li>
<li><em>heap</em>   Print contents of heap, i.e. dynamic allocated data. </li>
<li><em>help</em>   Print list of commands.</li>
<li><em>memory</em> Print memory status.</li>
<li><em>quit</em>   Stop sketch. </li>
<li><em>stack</em>  Print contents of stack, i.e. call frames, arguments, return addresses.</li>
<li><em>variables</em>  Print list of registered variables.</li>
<li><em>where</em>  Print source code file and line where debug shell was called.</li>
</ul>

<p>All debug shell commands can be abbreviated to single character commands. Please see the README for further details; installation details, example sketch and benchmarking. </p>
 3917: <p>As noted in Majenko's answer, the Arduino IDE doesn't provide a breakpoint  mechanism but <a href="http://www.atmel.com/webdoc/atmelstudio/ch05s07s01s01.html" rel="noreferrer">Atmel Studio does support breakpoints</a>.[*]</p>

<p>However, if you have a switch and an LED, you can track the progress of your program in a way that provides some of the benefits of breakpoints.  You would add a subroutine, say <code>BPReport()</code>, that via serial output or an LCD reports values of critical variables, then lights the LED and waits until the switch has been pressed and released, with debounce.  Call your <code>BPReport()</code> routine whereever you want an unconditional breakpoint.  For conditional breakpoints, you can have a routine <code>BPReportIf(cond)</code> which calls  <code>BPReport()</code> if <code>cond</code> is true.  If you don't want to output via serial, you might use several LEDs or an LCD, and you might use several switches if you want external break controls (for example, <code>cond</code> could be a test of one of the extra switches).</p>

<p>[*] Some hardware debuggers modify downloaded code each time breakpoints are added, changed, or removed.  That usage will wear out flash memory more rapidly than just occasionally downloading to it.  If a chip has been heavily used for such debugging, don't use that chip in a production system.</p>
