Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319025 - Source Not Found error stepping into class Constructor
Summary: Source Not Found error stepping into class Constructor
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-06 11:52 EDT by greg CLA
Modified: 2010-07-12 14:20 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description greg CLA 2010-07-06 11:52:09 EDT
Build Identifier:  20100218-1602

If i try to step into a class constructor, i get 'Source not found' and the 'Edit Source Lookup Path'. 
If i step over the constructor and step into a method, it works fine. 

Assuming we want to look at class X
If you put a main() in the class X file, set up a Launch Configuration for X.main, mock up code to correctly call the X constructor, then you can step into the constructor. 



Reproducible: Always

Steps to Reproduce:
1.create a helloworld class
2.create a debugme class 
3.add debugme constructor, put in trivial logic like i=3;
4.add debugme.easyMethod, put in trivial logic like i=4;
5.in helloword, instantiate debugme dM and then call dM.easyMethod();
6. put breakpoint on dM.easyMethod(); Observe nice stepinto functionality.
7. terminate
8. put breakpoint on instantiation line. 
9. rerun
10. note not so nice 'Source not found' error.
11. grit teeth, smile.
12. thank eclipse resources for making nice tool and not charging.
Comment 1 Darin Wright CLA 2010-07-12 14:19:27 EDT
The "source not found" editor is for the class loading code... 

This works for me:

* set breakpoint on instantiation
* step into
* see source not found for:

Thread [main] (Suspended)	
	owns: Launcher$AppClassLoader  (id=18)	
	Launcher$AppClassLoader.loadClass(String, boolean) line: 261	
	Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 251	
	Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: 319	
	helloworld.main(String[]) line: 17	

* step return
* step into
* **see** source for the constructor

This is because the "debugme" class is being loaded, and there is no source for the JRE's classloader.
Comment 2 Darin Wright CLA 2010-07-12 14:20:37 EDT
Note, you could configure step filters to avoid this.