Stepping through code
After the debugger pauses execution, you can step through the code one line at a time in one of the following ways:
Step over |
Execute the current line. If the current line is a method call, then run the method and return to
the next line in the current code block after the method ends. To
step through your code in this manner, on the Run menu, click
Step Over
|
Step into |
Execute the current line of code. If the current line is a method call, then step into the method
and pause before executing the first line for that method. To step
through your code in this manner, on the Run menu, click
Step Into
|
The only difference between these two stepping options is if the current line of code is a method call. You can either step over the method and let it run without interruption, or you can step into it and pause before each line. For other lines of code that are not methods, stepping over and stepping into behave in the same way.
While paused, you can navigate to other rules or classes if you want to look at their code. To
return to viewing the current execution point, on the Run menu, click Show Execution Point
. Studio highlights the line of code to execute the at the next step.
