Stepping through Methods (Integrated Debugger)

When a running thread is suspended at a certain place in the program, the Source pane in the Debug page indicates the point at which the execution stopped by highlighting the corresponding code.  You can move forward through the code, step by step, in a variety of ways.

Toolbar
Icon
Selected Menu Option Description
into.gif (1026 bytes) Step Into Steps into the current statement, and if the statement calls a method, it adds the method to the stack and stops execution on the first line of the method. 

If the method is in an external class, but if source is available on the Debugger class path, then this works as though the method were in the workspace; if the source is not available, the external method will be stepped over.

Each time you click Step Into, the debugger steps into each method called, adding and removing each to and from the stack as they are stepped through.

If you step into a statement that does not call a method, the effect is the same as stepping over the statement.

over.gif (1014 bytes) Step Over Runs the current statement, including all methods called within the statement.   Stops before the next statement.

If you step over a method that takes a significant amount of time to run, the string "/* Thread is currently stepping*/" will be inserted into the Source pane.  You may wait till it returns or click the Resume button resume.gif (1020 bytes) to stop debugging it.

return.gif (1026 bytes) Run To Return Runs the current method up to the return statement, and stops before returning to the statement that called the current method.
  Run To Cursor Resumes running up to the statement where you have placed the cursor in the Source pane.
  Drop to Selected Frame Resets thread execution to the start of the selected method.
resume.gif (1020 bytes) Resume Runs to next breakpoint, until you manually suspend thread, or to the end of the program.

Note that execution may stop earlier than indicated above, if the debugger encounters a breakpoint or an exception.

ngrelc.gif (533 bytes)
The Integrated Debugger

ngrelt.gif (466 bytes)
Debugging During the Development Cycle
Setting Breakpoints in Source Code
Setting Breakpoints in External Classes
Suspending, Resuming, and Terminating Threads
Modifying Code while Debugging
Setting Debugger Options