Eclipse Tips: Debugging your multi-thread application

One of difficulty in debugging a multi-thread application is that there are several threads running at one time and if you are defining a standard breakpoint in your application, it will only break the related thread. The other threads will be still running.

Eclipse actually has provided a tool to break all threads in the same JVM which can be quite useful in such case. You must open the breakpoint properties window from your breakpoint definition and there you will get a dialog like following.


The bottom combo box can be changed to suspend VM.


If you do something like this your entire VM will be suspended in case of a breakpoint is reached. That won’t make creating a multi-thread any easier, but at least the tool will help you locate the bug you create.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.