0

I have two projects in my workspace say ProjectA and ProjectB. Only project names are different but both projects contain almost the same files. When i add breakpoints on a class in ProjectA say at line 152, the control instead of stopping at line 152 of the class in ProjectA, automatically is opening the class of ProjectB and stopping at line 152. I am unable to figure out why it is automatically opening the class of ProjectB and stopping at line 152.

user3488632
  • 109
  • 1
  • 3
  • 7

1 Answers1

0

Have a look at Run -> Debug Configurations... -> Source. There you define the sources where to look for the source code when debugging a class. Maybe you have a reference to ProjectB there?

Harmlezz
  • 7,972
  • 27
  • 35
  • how do i tell eclipse to debug ProjectA in Run -> Debug Configurations... -> Source. I mean how do i set ProjectA to be debugged. If i click on Add i get a pop up with options like Archive, Java Project, Workspace Folder – user3488632 Apr 22 '14 at 13:29
  • The easiest way is to define a break-point in the source code of the class you like to debug. Then start to debug that class by selecting `Run -> Run As -> Java Application`. End the debug session and follow my instructions given above. – Harmlezz Apr 22 '14 at 13:32
  • After right-clicking the project you want to debug, click "Debug As > Java Application". Afterwards, the "Run > Debug Configurations .." Dialog will have a standard debug configuration for your desired project which you'll be able to examine and configure any further. – hiergiltdiestfu Apr 22 '14 at 13:33