Analyzing external stack traces

As a developer, you certainly get exceptions from users or QA engineers. And unlike the exceptions that you get in the debug mode, they don’t have those nice links that help you to navigate to source. If your source code is scrambled, the things get even more complicated.

Now imagine that you can simply copy an exception to your IDE and then navigate to source from the console. How much time will it save?

To save your time and make bug fixing a little less boring, IntelliJ IDEA developed the Stack Trace Analyzer. It works exactly as described above. Just click Analyze Stacktrace under the Analyze menu, and copy your stack trace in the dialog box. If your bug tracker or mail client corrupts stack traces (cut or wrap lines, etc.), simply click Normalize.



IntelliJ IDEA can unscramble the stack trace. By default, it supports only Zelix KlassMaster, but others can be added by plugins (for example, ProGuard plugin). You only need to select your unscramble tool and specify the location of log file.

Click OK, and voila – you get the stack trace in the console and the navigation to source is available.



Got interested? Read more about IntelliJ IDEA’s debugger and stack trace navigation.

Note   This tip was originally posted at www.javalobby.org.


Technorati tags: , ,
This entry was posted in Tips & Tricks. Bookmark the permalink.

2 Responses to Analyzing external stack traces

  1. Nice functionality, but which versions of JRE do you support?

    Sun’s format is different from JRockit and both are very different from IBM’s. And even for Sun’s JRE, 1.4 is different from 1.5 and different from the stack returned by API call.

    I wrote about the differences a while ago at:
    http://dev2dev.bea.com/pub/a/2004/01/thread_dumps.html

  2. I really like this feature, just copy stack traces from log file and paste to IDEA… nice feature

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>