Stepping Through Your Program

See Also

Once execution of your program is halted, you can step through your lines of code using the following actions in the Stepping menu or toolbar:

Step Over (F8)
Executes one source line. If the source line contains a call, executes the entire method without stepping through the individual lines.
Step Instruction Over
Executes one byte code instruction. If the code invokes a method, executes the entire method without stepping through the individual instructions.
Step Into (F7)
Executes one source line. If the source line contains a call, the IDE stops just before executing the first statement of that method.
Step Instruction Into
Executes one byte code instruction. If the code invokes a method, the IDE stops just before executing the first code of that method.
Step Out (Alt-Shift-F7)
Executes the remaining lines of the method and returns control to the caller of the method.
Run to Cursor
Sets a temporary breakpoint at the line of code at which the text cursor is currently positioned, and continues execution such that the breakpoint will be hit. The breakpoint is then deleted once it has been reached.

While stepping through your program, the current context will be updated automatically. Subsequently various debugger windows will also be updated to display the relevant information.

Breakpoints

While single-stepping over method calls, or stepping out of a method call, breakpoints that are encountered by the debuggee will still cause it to be suspended. That is, single-stepping does not preclude hitting breakpoints.

Exclusion Filters

Normally when stepping through the code in the debuggee, you may step into methods that are not a part of your application. To avoid this, you can define a set of stepping exclusions. A stepping exclude is a class name, or just a package name, for which you do not want to step into code within that class or package.

The exclusion filters are defined in the Options dialog, available from the Tools menu. The property is called Stepping Excludes and is found under the Debugging/General category.

Examples of exclusion filters would be:

See Also


Legal Notices