Using the Monitors Window

Java supports multithreading at the language level through the use of synchronization. Synchronization is the coordinating of activities and data access among multiple threads. The mechanism that Java uses to support synchronization is the monitor. The Monitors window displays status and control information for active monitors.

The Monitors window is useful in detecting deadlocks in your programs. The Monitors subsection is actually a data panel, so objects and arrays can be expanded, similar to the Data and Watches windows. The Owning Thread, Waiting Threads, and Blocked Threads subsections are actually thread panels, so they show much of the same information as the Threads window.

Note: For more information about this window including its context menu options, press press F1 or click Help in the Monitors window.

To open the Monitors window:

  1. Open source files in the Source Editor and set breakpoints.

  2. In the toolbar, click debug_toolbar_icon Debug.

  3. When the debugger stops at the breakpoint, select View then choose Debug Windowsthen choose Monitors.


Related topics

About Deadlocks
About Breakpoints
Using the Debugger Windows
Setting Preferences for the Debugger Windows