I want the debugger to open a java file instead of a class (from the library)

In eclipse workset, I have an android library and an application that uses this library. When I set a breakpoint in the java file from the debugging application, and the Java file is available. But when I debug the dependent library instead of opening the file with the Java file extension with the "class" extension, it opens in the debugger. Is it possible to create an open java eclipse file instead of a class?

+7
source share
4 answers

Right-click the project and select Properties, then select the Java Build Path section. On the Libraries tab, you will find the list of JARs that the project uses; expand the JAR and you will see a place for "source binding". Select this, and then use the "Edit" button to tell Eclipse where the source code lives.

+8
source

You must explicitly add sources to your build path in eclipse. If you use maven, you can put it in your xml settings:

<properties> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </properties> 
+1
source

You must set the source path for this jar / library. Runs in the build path> → java if I correctly rasovat.

0
source

Yes, you must add the source code in the lib properties - then both the debugger and the code editor (when you press Ctrl + click) show java code instead of byte code.

0
source

All Articles