DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Source not found
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Oct 2008
Default Source not found - 10-28-2008, 09:39 PM

I'm about ready to give up on Eclipse - I'm getting this ridiculous error out of nowhere (everything was working fine before, don't know what changed) and I've wasted 3 days trying to get Eclipse to debug properly.

I can run my programs just fine with multiple classes, but when I try to debug into any class outside the 'public static void main' class where the program enters, I get the "Source not found" page and "Edit source lookup path..." button.

I've scoured the internet/forums and none of their solutions have helped me. I'm using the standard version of Eclipse, no fancy plugins, JRE 6, no spaces in any project/file names. I try making a simple test app with 2 classes in the same file, not importing anything, and it doesn't work. When I click the button to edit source path it shows my project in their under the parent "Default" folder - even so I've tried manually adding my project and it makes no difference. I've even installed eclipse fresh on my brand new PC, and same problem. HELP!!!
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2010
Default 07-06-2010, 08:53 AM

I am having the same problem, slightly more complex project I inherited. Rather frustrating.
I am able to make code changes, I can tell they are being compiled and understood, but I cant step in.
Relegated to 1980 style print and play debugging
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2010
Default 07-06-2010, 09:31 AM

Additional thought.
Studying the class that can be stepped (A), and the one that cant (B), I realize A has a main().
So I add a main() to B.
I still can not step from A into B. No big surprise.

However, if I add a Launch Configuration and point at B.main(), it steps in wonderfully.
I can then mock up some code, just to prove a point, whereby B actuall does some mock code and then calls A.

A then calls B and you can step through it.

So - This is not a project issue, but a Launch Configuration issue. ?maybe?

I am just thinking outloud here, b/c lots of people post on this issue. And while I have found many statements of the problem, slight variations, I have not found any help.

Someone help!!! lol.

greg
Reply With Quote
  (#4 (permalink)) Old
Member
 
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2010
Default 07-06-2010, 10:37 AM

Constructors?
Follow on to previous post

Adding a simple class and playing with that, I realize that I can not step into a class' constructor.

I can make a trivial class and make a trivial assignment (i=3 and I reproduce the issue.
However, I can step over the constructor and step into any method.
I reproduced this behaviour in the production code.

So - if you are having this problem, there are 2 work arounds that I know of

1. If you just need to test the code, you can put a main() in the class and call yourself from there. wow.

2. If you can refactor the code , pull the logic out of the constructor and put it in a sub. You should be able to step through the sub. Again, wow.


I think i have narrowed this down quite a bit, if anyone can tell me why i cant step into a constructor, I would appreciate it.
Reply With Quote
Reply

Tags
debug

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging in eclipse - source not found? maxmal Eclipse 6 02-03-2012 05:22 AM
CDT source kenasato Eclipse 1 07-16-2008 11:41 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com