Community
Participate
Working Groups
Build Identifier: 20100617-1415 You can enable "Show monitors" in the debug view (by choosing view menu -> Java -> Show monitors) but this only shows monitors taken with the synchronized keyword. It would be nice if other monitor gotten through java.util.concurrent locks are shown as well. When doing a thread dump with VisualVM this information is displayed so the information should be available for Eclipse as well. Reproducible: Always Steps to Reproduce: import java.util.concurrent.locks.ReentrantLock; public class TestLockDebug { public static void main(String[] args) { Object lock1 = new Object(); ReentrantLock lock2 = new ReentrantLock(); try { lock2.lock(); synchronized (lock1) { try { Thread.sleep(100000); } catch (InterruptedException ignore) { } } } finally { lock2.unlock(); } } } Running the above program using JDK 6u23 (suspending the main thread after starting it in debug mode): Eclipse Helios Release Build id: 20100617-1415: Thread [main] (Suspended) owns: Object (id=15) Thread.sleep(long) line: not available [native method] TestLockDebug.main(String[]) line: 13 VisualVM 1.3.1 thread dump: "main" prio=6 tid=0x003b8400 nid=0x1120 waiting on condition [0x0090f000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at TestLockDebug.main(TestLockDebug.java:13) - locked <0x02e60c30> (a java.lang.Object) Locked ownable synchronizers: - <0x02e6c600> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)