You can set a breakpoint on the line that you want the debugger to stop, and then run the program in debug mode.
Put the cursor on the line, then select Debug / Toggle Line Breakpoint (Ctrl + F8). Then, to run it, select Debug / Debug Project or Debug File (if the file contains the
main() method). The program will stop in the debugger when the line is reached, and then you can step through it, looking at the values of variables, or let it continue running.
Have a look at:
NetBeans Debugger - Short Tutorial.