How to debug a multi-threaded app in IntelliJ?
The documentation reads confusingly, but this is the relevant block. What it distills down to is setting the property to suspend on threads, and not the entire application instead. This will cause you to hit the break point on each individual thread instead of an arbitrary, indeterminate thread.
- Suspend Policy: All
- When a breakpoint is hit, all threads are suspended.
- Suspend Policy: Thread
- When the breakpoint is hit, the thread where the breakpoint is hit is suspended.