Analyze Exceptions with Pleasure!

Posted on by Konstantin Bulenkov

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. 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. Alex says:

    October 10, 2012

    Impressive!
    Will it work for Android projects also?

  3. joe says:

    October 10, 2012

    freaking awesome

  4. Alex says:

    October 10, 2012

    Cool! Didn’t know that.

  5. 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 http://youtrack.jetbrains.com/ ? Thank you.

  6. 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. Leon says:

    October 10, 2012

    ohh, genius, Impressive!

  8. 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. 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. Mark Vedder says:

    October 19, 2012

    I just submitted a small enhancement request for this new feature… detect non-normalized stack traces. http://youtrack.jetbrains.com/issue/IDEA-93307

  11. 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 http://sta.lk/z

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

Subscribe

Subscribe for updates