Stepping Through Code Execution

Stepping is performed relative to a thread. When a breakpoint is
reached, all threads are suspended, and the thread that encounters the
breakpoint becomes the current thread. You can then step through the
code that the current thread is executing.
Note that if the thread you have designated as the current thread is in
a suspended state and a breakpoint is reached in another thread, the
context does not automatically switch to the thread where the
breakpoint was encountered. The current thread must be running for the
context to switch automatically to the thread where the breakpoint was
encountered.
-
When execution of a thread is suspended at a breakpoint, use the Step
Into, Step Over, or Return buttons or menu options to step through the
code that the thread is executing.
-
Step Into
-
Executes a single step in a line of source code. If a statement invokes
a method, it is stepped "into." That is, the next source
statement is displayed, even if that statement is encountered in a
different method.
-
Step Over
-
Executes a single step in a line of source code. If a statement invokes
a method, it is stepped "over." That is, the next source
statement in the current method is displayed, although statements in a
different method are being executed.
-
Return
-
Continues execution of the thread until the current method that is
being executed returns.
Notes
-
If you select a frame other than the one
where execution actually stopped, and you initiate a Step Into, Step
Over, or Return, the thread runs until it returns to the selected
frame, at which point the action you chose takes place.
-
If you step into a method for which the source code is not available,
the Source panel displays the message "Cannot find file.java."
If you have access to the source file, and you want to display it,
choose Project > Project Settings... to open the Project Settings dialog, then enter
the pathname to the source file in the File Search Path field.
-
To step more than one line at a time, press the right mouse button over
the Step Into or Step Over button and select the number of lines to
jump.
-
You cannot set breakpoints in, or step into, native (non-Java) methods.
-
To avoid a deadlock that would freeze your debugging session, the Java
interpreter does not allow the debugger to suspend a thread which is in
the process of using certain important Java runtime resources, such as
I/O operations.
-
Status information about uncaught exceptions is displayed in the status
line. If your code includes an exception that is not handled, your
program exits when the exception is thrown, and the message
"Uncaught exception thrown" appears in the status line with
details on the exception that was thrown and the class name and
location where the exception was thrown.

See Also

Guide to the Cosmo Code Development Environment
12-96*243