Stepping Through Your Program
See Also
Once execution of your program is halted, you can step through your lines of
code using the following commands on the Debug menu or toolbar:
- Step Over (F8). Executes one source line. If the source line contains
a call, executes the entire routine without stepping through the individual instructions.
- Step Over Expression (Shift-F8). Executes one method call in an expression.
If an expression has multiple method calls, you can use Step Over Expression to step
through an expression and view the value of each method call in the expression in
the Local Variables window. Each time you use the Step Over Expression command, the debugger
advances to the next method call in the expression and the completed method call is underlined.
Step Over Expression behaves like Step Over when there are no additional method calls.
- Step Into (F7). Executes one source line. If the source line contains
a call, the IDE stops just before executing the first statement of the routine.
You can also start a debugging session with the Step Into command. Program
execution stops on the first line after the main routine before
any changes have been made to the state of the program.
- Step Out (Ctrl-F7). Executes one source line. If the source
line is part of a routine, executes the remaining lines of the routine and
returns control to the caller of the routine.
The completed method call is highlighted in the Source Editor.
- See Also
- Stepping Through an Expression
- Setting a Java Breakpoint
- Starting a Local Debugging Session
- Starting a Remote Debugging Session
- Attaching Source Code to a JAR File
Legal Notices