Stepping Through Code

Stepping in source code executes just one instruction or line of code in the debuggee at a time. This is useful for finding exactly where a particular condition occurs in the code. The actions described below are accessible via the named commands as well as through the "Step" menu items.

Operations

There are several commands for stepping through source code. They are described as follows.

step
Step a single line of source code, going into method calls, if any. That is, if there is a method call being made, execution will be halted at the top of that new method.
next
Step a single line of source code, going through method calls, if any. That is, it runs the method at full speed rather than stepping into it.
stepi
Step a single instruction, going into method calls, if any.
nexti
Step a single instruction, going through method calls, if any.
step out|up
Returns to the line that invoked the current method. This is identical to the "finish" operation found in other debuggers.

Exclusion filters

At some point or another you will single-step into the Java core classes. This will happen often enough that you wish you could avoid stepping into such classes. Fortunately, JSwat provides the exclude command for just this purpose. You can add individual classes and entire packages to the list of class filters. During single-stepping, the debugger will not step into these classes. See the exclude command help for more information.