Java – Eclipse “Class File Editor” Source Not Found While Debugging

debuggingeclipsejava

I have a project in Java that I am stepping through and when I'm using external libraries e.g. jdom.jar I end up hammering step over to get out on the "Class File Editor". I really don't care about whats in these libraries I'm just using them to process things for my own code.

Is there anyway to get around this popping up?

It's so frustrating hammering step over every time I accidentally step into a class file which I know has no source and is completely pointless me looking through.

image below:

enter image description here

Best Answer

There are various solutions:

  1. You can download the sources and attach them (select the dependency in the Package Explorer, open the Properties dialog for it, set the path under "Java Source Attachment")

  2. If you don't have the source, install JADClipse

  3. Use "Step Over" (F6) instead of "Step Into" (F5)

  4. If you accidentally stepped into some code, use "Step Return" (F7) to run the whole method and resume debugging after it has returned.

  5. You can tell Eclipse what you don't want to step into using "step filters".

Related Topic