Debugging Threads in the IDE

See Also

All the threads created in the current session are displayed in the Threads window. For Java applications, this list also includes the thread groups in the application. You can open the Threads window by choosing Window > Debugging > Threads (Alt-Shift-7).

Changing the Current Thread

Only one thread is the current thread at any given time. By default, the current thread is the thread within the current session from which the debugger gained control. When you switch between threads to debug, the Call Stack and Local Variables windows are automatically updated to reflect the data applicable to that thread.

To change the current thread:

Suspending and Resuming Threads

You can suspend execution of a thread if you think it is causing problems and then later resume the thread once the problem is solved.

In the Threads window, the icon to the left of the thread name indicates whether the thread is suspended or waiting to be resumed.Current thread indicates the current thread. Running thread indicates a thread that is running and is not current, and Suspended threadindicates a thread that is suspended and is not current. You can also display the Suspend property as a boolean flag (True or False) in the Threads window by clicking the columns button (Change Column) and select the Suspend checkbox.

To suspend or resume a thread:

Viewing Source Code for a Thread

You can view the source code of a thread in the IDE's Source Editor if you think it is causing problems and want to examine it further.

To view a thread's source:

See Also
Creating a Watch
Using the Call Stack
Stepping Through Your Program

Legal Notices