IntelliJ debugger gets stuck

后端 未结 5 856
死守一世寂寞
死守一世寂寞 2021-02-02 07:38

I\'m debugging a normal Java application, no GUI, just a lot of computations and ~5 calls in the stack for the main thread when the problem occurs. Basically it keeps saying \"C

5条回答
  •  忘了有多久
    2021-02-02 08:25

    I just ran into what looks like the same issue. In my case it was a class (KafkaStream) in the breakpoint stack trace with a "bad" toString method. The toString method blocks and therefore hangs the debugger. I tested the toString method in the main line code and it hung the main thread (i.e. this is not a debugger specific issue).

    Here is the stack trace for my thread that hit the breakpoint (on a line that was just trying to test a boolean attribute of my class):

    Hung Breakpoint Stacktrace

    Intellij provides a way to work around for my issue. It allows you to override how the debugger renders the class:

    Work Around

    If your issue comes back I suggest taking a thread dump (inside or outside of the IDE) and see what your thread is doing.

提交回复
热议问题