Analyze Exceptions with Pleasure!

Every developer in the Java world has to deal with exceptions. An exception stack trace is the easiest way to tell what’s wrong in your program. In IntelliJ IDEA, we strive to make stack trace analysis as user-friendly as possible for you. To this end, IntelliJ IDEA has an Exception Analyzer which helps you analyze a stack trace.

Today I would like to tell you briefly how you can save your time dealing with stack traces.

Here’s what usually happens with exceptions:

  1. You receive an exception by email, bug tracker or messenger.
  2. Copy it to clipboard.
  3. Switch to IntelliJ IDEA.
  4. Go to Analyze → Analyze Stacktrace.
  5. Click OK.

Now you can easily skip steps 4 and 5. Simply select the option in the Analyze dialog for painless analysis. Voila!

This entry was posted in Tips & Tricks and tagged . Bookmark the permalink.

12 Responses to Analyze Exceptions with Pleasure!

  1. SteveL says:

    One thing that’s always disappointed me is that the right button popup menu’s analyse stack trace option doesn’t take the currently selected text as the stack trace to work with.

    That’s a shame if your window is showing the text or XML output of a junit test run…

  2. Alex says:

    Will it work for Android projects also?

  3. joe says:

    freaking awesome

  4. Alex says:

    Cool! Didn’t know that.

  5. @SteveL: It will if you press Ctrl+C before you call the analyze action :-) Could you please describe your issue as a feature request here ? Thank you.

  6. Bill says:

    Can you summarize what the feature is? It might sound silly, but I don’t want to watch a six-minute video to find out.

  7. Leon says:

    ohh, genius, Impressive!

  8. Hello Bill. First of all it’s 46 seconds video (where did you get 6 mins? O_o ) Secondly, as it’s stated in the post: this feature is ability to skip 2 steps to analyze exceptions. Other words, every time you switch to IntelliJ it scans your clipboard for an exception stack trace. And if there is it will show this stack trace in IntelliJ with hyperlinks to files/lines. Does this make sense now?

  9. Mark Vedder says:

    Very nice. It’s the little touches like this that makes IDEA such a, yes, *pleasure* to use.

  10. Mark Vedder says:

    I just submitted a small enhancement request for this new feature… detect non-normalized stack traces.

  11. @Mark Thanks for the stack trace. I’ve fixed the problem and found a bug in my regexp – missing “_” in package names

  12. Dmitry says:

    Beware that having a large chunk of data in the clipboard might cause OOM in IDEA when this option is enabled.
    See IDEA-164889 for details.

Leave a Reply

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