Thread dumps is a basic yet powerful tool to examine the state of an application at a particular instant. This lets us investigate execution and synchronization issues
The main advantage of thread dumps is their simplicity. You can create them for any process (no agents are needed). Their output is plain text, meaning that anyone can read them without any special software.
Capture a thread dump from IntelliJ IDEA
On the Home tab of the Profiler tool window, click the process, for which you want to create a thread dump. Select Get Thread Dump.
The stack traces for all threads open in a new Profiler tool window tab. This view is customizable: you can apply filters and sorting, merge similar threads, and partially collapse the stack traces.
If you want to inspect a class that appears in the stack trace, you can navigate to it right from the thread dump.
Jump to source
Click the hyperlink in the stack trace.
If you want to save the thread dump for later inspection or send it to someone else, you can export it as a text file.
Export thread dump as a text file
On the toolbar, click Export to Text File.
Specify the path and click Save.