When debugging code, it can be useful to suspend execution at a specific location in code so that variable values can be examined. To do this, use breakpoints.
For more information on breakpoints, see also NetBeans Help:
If your code is running, end execution by clicking the “Finish Debugger Session” icon
.
In the Projects window, under “Source Files,” double click on the file
main.c
to open it in an Editor window. Set a breakpoint on the
line in the figure by clicking in the left margin of the line.
Click the “Debug Project” icon to
execute the program again. The program will halt at the breakpoint. Hover over the
pot_value
variable to see its current value.
If you see a bulb warning icon next
to lines of code in the editor, you may need to set the path for include files.
See:
Set The Include Directory Path