Weekend Project: Thread Dump Viewer for Eclipse
A couple of weeks ago, one of our users reported that Eclipse consistently froze when executing some action. I was hoping that Eclipse would have an editor where I can open the thread dump I got and navigate, through hyperlinks, from stack traces to source code. The closest thing I found was the “Java Stack Trace Console,” which provides hyperlinking to source code. It would have been nice if there is a specialized editor that provides the following features, besides code navigation:
- an Outline View that shows the threads by name (with icons representing their state) and any deadlocks found
- some basic syntax highlighting to make reading easier
- ability to collapse blocks (e.g. a thread or stack trace) to minimize noise
- navigation to thread definitions from references (e.g. a deadlock)
BTW, IntelliJ IDEA provides something somehow close to what I’m asking for since 2008! 2008!
In addition, I didn’t want a tool that analises a thread dump for me (e.g. TDA or the IBM one.) So far, I haven’t seen a thread dump that is that hard to read.
Of course I had to scratch my own itch! This past weekend I finally had time to write my own “Thread Dump Viewer.” It is an editor that provides everything I described. I was able to write a working editor in a matter of hours, using Xtext. The key was getting the grammar right. I spent an additional couple of hours making it “prettier.”
Here is a screenshot of the editor (click to enlarge.)
Here is a demo showing off the features of the “Thread Dump Viewer.”
I created this tool for my own use. I haven’t open-sourced the code
or made the plug-in publicly available simply because I don’t know if
anybody else would find this tool useful. If you do, please leave a
comment.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)







Comments
Jan Willem Janssen replied on Thu, 2012/11/15 - 4:47am
Please do release this plugin!
I'd like to have such a plugin for Eclipse as well, and since you've already scratched your itch... ;)
Ulrich Merkel replied on Thu, 2012/11/15 - 8:17am
let me backup Jan: PLEASE release this plugin.
Especially these basic helpers are very hard to find, and after you have spent a weekend,
it would be nice to share.
You will get a lot of "stars of eccelence" from me for this
Alex Ruiz replied on Mon, 2012/11/19 - 2:06pm
in response to:
Ulrich Merkel
Jan & Ulrich,
Thanks for the comments. I'm in the process of releasing the project as open source. I have to do some cleanups first. I'll write another post when it is ready.
Cheers!