Reputation: 497
I copied an Eclipse Java project and tried to run the debugger on the copied version. The debugger used the code of the old project. What can I do in this situation?
Upvotes: 12
Views: 17315
Reputation: 141
in my case, I have 2 project (A and B) that is referring different version of C. Say A is referring C version 1, and B is referring C version 2. When I am debugging A, C version 2 's source came up always, not C version 1. I ends up adjust the order in debug configuration by remove project B and re-add it. I made project A ahead of project B. That solves the problem.
Upvotes: 0
Reputation: 9220
Right-click on the top frame in the debugger's stack view, and select "Edit source lookup...". Remove the incorrect source entry from the list, and/or add the correct one.
Upvotes: 8
Reputation: 353
I had the same problem. Going into the Debug Configurations as per Francis Upton's answer it all looked fine, but I still had the same problem.
Restarting Eclipse fixed it.
Upvotes: 0
Reputation: 410
One thing you can do is to link your server project src folder to your current project.
This could be done as follows:
Right click on project B --> Properties --> Java Build Path --> Source --> Link Source --> Browse, then locate the A project src. Finally change the Folder name field as you wish.
I hope this helps :)
Upvotes: 0
Reputation: 19443
Have a look at the launch configuration that you are using to start the debugger. In the Package/Project explorer, do right-click Debug As..
and then select Debug Configurations
and make sure all of the details of the launch configuration you are using line up with your new project.
Upvotes: 16