Reputation: 1361
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:
Upvotes: 16
Views: 91154
Reputation: 19
For me the issue was in pom.xml of the debugged project.
In my dependent project - the dependency version was 1.9.3
<dependencies>
<dependency>
<groupId>com.aaa</groupId>
<artifactId>abcautomationlayer</artifactId>
<version>1.9.3</version>
</dependency>
</dependencies>
Whereas it should have been 1.9.3-SNAPSHOT. As the primary project has the version info in that way
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.aaa</groupId>
<artifactId>abcautomationlayer</artifactId>
<version>1.9.3-SNAPSHOT</version>
So changing from 1.9.3 -> 1.9.3-SNAPSHOT in dependent project did the trick
Upvotes: 0
Reputation: 1374
Unchecking the option Java -> Debug -> "Use advanced source lookup (JRE 1.5 and higher)" checkbox resolves this issue for me.
Upvotes: 0
Reputation: 153
Upvotes: 3
Reputation: 123
If you are using gradle, port your dependencies to eclipse classpath by using the eclipse plugin.
Upvotes: 0
Reputation: 9897
Go to Project > Properties > Java Build Path > Libraries
Expand JRE System Library.
Expand rt.jar.
Select Source attachment and double click or Edit. Type path the source code file (External File…) and press OK.
Upvotes: 5
Reputation: 328536
There are various solutions:
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")
If you don't have the source, install JADClipse
Use "Step Over" (F6) instead of "Step Into" (F5)
If you accidentally stepped into some code, use "Step Return" (F7) to run the whole method and resume debugging after it has returned.
You can tell Eclipse what you don't want to step into using "step filters".
Upvotes: 17
Reputation: 91
Simple way-- Works for me :)
Select Attach Source->(External Location Radio Box)External File-> Select src.zip from java/jdk1.x.x.xx folder
and done!!
Upvotes: 9
Reputation: 21452
open 1- help 2- Install New Software in work with click at Add http://adt-addons.googlecode.com/svn/trunk/source/com.android.ide.eclipse.source.update add source code then in attach source chose external location in patch click external file documents - eclipse - plugins - choose package we just download (source code package) example : com.android.ide.eclipse.source...... - 14 sources.zip i hope this work with you
Upvotes: 0