How to debug a multi-threaded app in IntelliJ?

前端 未结 1 835
青春惊慌失措
青春惊慌失措 2020-11-28 07:02

I\'m having a strange issue with multiple threads and breakpoints in IntelliJ IDEA 14.0.2. Code after the breakpoint is executed before it stops on it.

impor         


        
相关标签:
1条回答
  • 2020-11-28 07:35

    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 box checked with Thread radio button selected.

    • 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.
    0 讨论(0)
提交回复
热议问题