Stepping is a very common method of debugging that executes the code line by line. So, this approach can be used when there is a requirement to check one line at a time. It simply controls the flow of program.
Techniques of Stepping
There are three techniques of stepping:-
In this approach, the particular line where the program is paused will get executed and now the program will paused on the next line.
In this technique, debugger entered into the method and start debugging line by line by using step over approach.
Once the method is debugged, step return is used to exit the control of program from that particular method.
Through this example, we will try to understand the JDB stepping.
If you notice in the below screenshot, the arrow (=>) indicates the current position of program control.