IntelliJ IDEA 2023.2 Help

Analyze external stack traces

You might want to analyze exceptions received by someone else, for example, QA engineers, or investigate a deadlock, or a hang-problem. Unlike the exceptions that you get in the debug mode or when running unit tests, these exceptions do not have links that help you navigate to the corresponding locations in the source code. Moreover, the source code can be scrambled.

With IntelliJ IDEA, you can copy an exception or full thread dump, paste it to the Stack Trace Analyzer, explore information, and navigate to the corresponding source code.

  1. Go to Code | Analyze Stack Trace or Thread Dump.

  2. In the Analyze Stack Trace dialog that opens, paste the external stack trace or thread dump into the Put a stack trace or a complete thread dump here: text area.

  3. Specify whether you want to have the stack trace unscrambled.

    To do that, select the Unscramble stack trace checkbox, select the desired unscrambler and log file.

  4. If the stack trace text is corrupted (lines are cut or wrapped, or too long, and so on) after processing with some software (for example, a bug tracker or a mail client), click Normalize.

  5. If you want to explicitly specify the directory with the corresponding dSYM files, select the Use additional directory to search for missing dSYMs checkbox and enter the desired directory in the field or choose it from the file system.

  6. Click OK. The stack trace is displayed in the Run tool window.

    To jump to the code that caused the problem, scroll to the stack trace line you need and click the link to the source file. The file opens in the editor.

    A thread dump shown in the Run tool window

Some calls in the Run tool window have a dotted underline. These calls occur inside the try/catch/finally block and can potentially throw an exception. The Try Blocks Highlighting feature in IntelliJ IDEA uses a bold dotted underline for such statements in the stack trace.

the Try Blocks Highlighting feature highlights calls in the Run tool window

Analyze Stack Trace dialog

Use this dialog to reach a navigable console stack trace for external applications. From each message in this stack trace, you can navigate right to the source code that cased the reported problem.

Item

Description

Unscramble stack trace

Select this checkbox to unscramble the external stack trace, if your source code is scrambled.

Unscrambler

Here you can select the unscrambler tool.

IntelliJ IDEA ships with the Zelix Klass Master unscrambler plugin. You can develop your own plugin to unscramble stack trace of the code being processed with any other obfuscator.

Log file

Specify the location of the unscrambler log file.

Put a stack trace or a complete thread dump here

Paste here the external stack trace or thread dump.

Automatically detect and analyze thread dumps copied to the clipboard outside of IntelliJ IDEA

If this checkbox is selected, IntelliJ IDEA will monitor and analyze the contents of the clipboard. You can select this checkbox only once, and your clipboard will be scanned every time you switch to IntelliJ IDEA.

As soon as something looking like a stack trace gets copied to the clipboard, IntelliJ IDEA will show this stack trace in the corresponding tool window.

Highlight files changed in last <this_many> days

Select this checkbox to specify the time period in which you want to check last changes in stack traces. The default time period is set to 31 days.

Normalize

If the stack trace text is corrupted (lines are cut or wrapped, or too long, and so on) after processing with some software (for example, bug tracker or mail client), click this button to restore the normal stack trace structure.

Last modified: 07 September 2023