Step through the program
Step Over:
Step Into:
Stepping is the process of controlling step-by-step execution of the program.
Aqua provides a set of stepping actions, which are used depending on your strategy, such as whether you need to go directly to the next line or inspect the intermediate method calls as well.
The stepping buttons are located on the Debug window toolbar.

Steps over the current line of code and takes you to the next line even if the highlighted line has method calls in it. The implementation of the methods is skipped, and you move straight to the next line of the caller method.
Click the Step Over button
or press .
If there are breakpoints inside the skipped methods, the debugger will stop at them. To skip any breakpoints on the way, use Force step over.
Enters the method to show what happens inside it. Use this option when you are not sure the method is returning a correct result.
Click the Step Into button
or press .
If there are several method calls on the line, Aqua asks you which method to enter. This feature is called Smart step into.
You can configure Smart Step Into to be automatically used every time when there are multiple method calls on the line. Alternatively, it can be invoked only when you expressly do so. To configure this feature, go to Settings | Build, Execution, Deployment | Debugger | Stepping and set the Always do smart step into option as required.
Some methods (for example, methods of standard Java classes like System
) are skipped by Step into as you normally might not need to debug them. This list can be fine-tuned on the Build, Execution, Deployment | Debugger | Stepping page of the Settings dialog () .
Smart step into is helpful when there are several method calls on a line, and you want to be specific about which method to enter. This feature allows you to select the method call you are interested in.
Select Smart Step Into from the
menu or press .
Click the method. Alternatively, select the method using the arrow keys or the tab key, and then confirm the selection by pressing either or .
You can configure Smart Step Into to be used instead of the regular Step Into every time there are multiple method calls on the line. This is done in Settings | Build, Execution, Deployment | Debugger | Stepping.
Steps out of the current method and takes you to the caller method.
Click the Step Out button
or press .
Continues the execution until the position of the caret is reached.
Place the caret at the line where you want the program to pause.
Select Run to Cursor from the
menu or press .
Also, you can Run to Cursor by hovering over the line and clicking the Run to Cursor icon.

You can configure whether you want Run to Cursor to work on clicking a line number in Settings | Build, Execution, Deployment | Debugger.
To skip any breakpoints on the way, use Force run to cursor.
Steps in the method even if this method is skipped by the regular Step Into.
Select Force Step Into from the
menu or press .
static void count(int to) {
for (int i = 0; i < to; i++) {
// the program is suspended here
System.out.println(i);
}
System.out.println("Complete!");
}
public void println(String x) {
// Force Step Into enters the implementation of PrintStream.println()
if (getClass() == PrintStream.class) {
writeln(String.valueOf(x));
} else {
synchronized (this) {
print(x);
newLine();
}
}
}
Continues the execution until the position of the caret is reached. All breakpoints on the way are ignored.
Place the caret at the line where you want the program to pause.
Select Force Run to Cursor from the
menu or press .
Steps over the current line of code and takes you to the next line even if the current line has method calls in it. If there are breakpoints in the called methods, they are ignored.
Select Force Step Over from the
menu or press .
Allows you to undo the last frame and restore the previous frame in the stack. This can be useful, for example, if you've mistakenly stepped too far, or want to re-enter a function where you missed a critical spot.
Note that this option only affects local variables and does not restore the overall program state in that it does not revert values for static and instance variables. This may result in an altered program flow.
In the Threads tab, hover over the frame you want to reset, then click the Reset Frame button that appears.
note
Reset Frame is not equivalent to going back in time. Keep this in mind when debugging your applications.