Idea logo

The IntelliJ IDEA Blog

The Capable & Ergonomic Java IDE by JetBrains

Tips & Tricks

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!

Comments below can no longer be edited.

12 Responses to Analyze Exceptions with Pleasure!

  1. Avatar

    SteveL says:

    October 10, 2012

    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. Avatar

    Alex says:

    October 10, 2012

    Will it work for Android projects also?

  3. Avatar

    joe says:

    October 10, 2012

    freaking awesome

  4. Avatar

    Alex says:

    October 10, 2012

    Cool! Didn’t know that.

  5. Avatar

    Konstantin Bulenkov says:

    October 10, 2012

    @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. Avatar

    Bill says:

    October 10, 2012

    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. Avatar

    Leon says:

    October 10, 2012

    ohh, genius, Impressive!

  8. Avatar

    Konstantin Bulenkov says:

    October 11, 2012

    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. Avatar

    Mark Vedder says:

    October 14, 2012

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

  10. Avatar

    Mark Vedder says:

    October 19, 2012

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

  11. Avatar

    Konstantin Bulenkov says:

    October 19, 2012

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

  12. Avatar

    Dmitry says:

    March 19, 2018

    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.

Discover more