facebook

Mixed up source code when debugging

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #198667 Reply

    cmcbrien
    Member

    OS: Windows XP
    Eclipse 2.1.1
    Eclipse freshly installed then MyEclipseIDE
    No other external plugins installed
    7 folders in /plugins like org.eclipse.pde
    MyEclipseIDE 2.6.2
    Sun j2sdk 1.4.2_01 for Eclipse and app server
    Using Tomcat 5.0.9

    I have a web application project in my workspace and several supporting projects which I JAR and move to the WEB-INF/lib directory of the web-app. These get deployed to the appserver and that all runs well.

    However, when I debug the source shown for packages in the supporting projects is wrong. It seems that becuase the same class and package name appear in different projects in the workspace, sometimes the wrong one is picked up. So if I have the class com.radical.test.TestPage in both project_1 and project_2, and I had jarred project_2 into my web app, the debugger is picking up the source code from project_1 instead. I can step execution, but what is being executed doesn’t match the source lines that are displayed, so it’s really screwed up.

    #198671 Reply

    Scott Anderson
    Participant

    It seems that becuase the same class and package name appear in different projects in the workspace, sometimes the wrong one is picked up.

    This is because when the debugger looks up a class, it only has the fully qualified classname to go on to find the source. Since the same exact class appears in two open projects, the debugger can’t disambiguate the referece. The easiest workaround is to temporarily close the project that contains the “wrong” files since the debugger will ignore all files in closed projects. When you’re ready to use the project again, simply reopen it.

    –Scott
    MyEclipse Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Mixed up source code when debugging

You must be logged in to post in the forum log in