Eclipse debugging “source not found”

前端 未结 6 1881
南旧
南旧 2020-11-29 05:50

I just started using Eclipse so go easy on me ;). But when trying to debug a JUnit test case I get a dialog that states the the source is not found when I get to this line i

6条回答
  •  北海茫月
    2020-11-29 06:35

    I had this very annoying problem for a long time but was finally able to solve it. In my case, a null pointer exception was being thrown somewhere in Java's Transformer.IsRuntimeCode(ProtectionDomain) function.

    I didn't really need to know about this since the exception was being caught and handled, but eclipse would pause debugging every time this happened and tell me that the source wasn't available. As a result, I constantly had to keep pressing the button to continue code execution.

    In order to prevent this from happening, I:

    1. Clicked on the "Breakpoints" window at the bottom of the debugging screen
    2. Right clicked "NullPointerException"
    3. Unchecked "Caught"

    This prevented the debugger from pausing program flow during a caught NullPointerException.


    (source: SharpDetail.com)

提交回复
热议问题