I have simple java programme like below :
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* @author
*
*/
public class IteratorRemoveTest {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
List<String> l = new CopyOnWriteArrayList<>();
l.add("a");//Line 11
}
}
I have set breakpoint at line 11 and want to debug into the add method by pressing the F5 or step into button available in the eclipse.
Below is the information about setup :
- I have source code attached to the eclipse and able to view the source code of the class.
When I set the debug point inside the add method I get the error : Image showing the error message
I have gone through the similar question How can I step into a core java class method in Eclipse? and tried all the ways but could not get the debug into the class file code.
Installed JRE snapshot : Installed JRE
Debug configuration : Debug configuration
Please let me know if any additional information is needed.
Guys, any sort of help/guidance is much appreciated.
-
IntelliJ does this seamlessly, no additional information required. Use a better IDE.duffymo– duffymo2018年02月15日 16:19:38 +00:00Commented Feb 15, 2018 at 16:19
-
@duffymo Even eclipse does this properly but there is something missing in the configuration that I need to find out and correct that. And FYI Eclipse is also widely used.Arvind Kumar– Arvind Kumar2018年02月15日 16:24:42 +00:00Commented Feb 15, 2018 at 16:24
-
I know, I used to use Eclipse exclusively. Until I was shown IntelliJ. It's a far superior product.duffymo– duffymo2018年02月15日 18:18:42 +00:00Commented Feb 15, 2018 at 18:18
2 Answers 2
I try myself and it work for me. One difference is that I am using a java jdk no jre. Possibly jre do not include the source code.
1 Comment
Check that the line numbers are turned on in the compiler Classfile configuration Select Window> Preferences and then type 'comp' in the filter. Select Java> Complier and check the highlighted checkbox
:
1 Comment
Explore related questions
See similar questions with these tags.