facebook

Debugger brings up wrong source file

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

    kcole
    Member

    I don’t know if this is a bug or I just have something configured wrong. This happens to all of our developers though.

    We have an application we are developing. We have one project setup for version 1.0 and a project for version 2.0. Version 2.0 is what is currently in the HEAD of CVS. When we stopped development on 1.0 we branched that off in CVS. But we still work on it to fix bugs. If using the debugger with version 1.0, the source file from the version 2.0 project is shown. This is very confusing because often times the stepper will not even be on the correct line since the source files may be different between versions. We haven’t been able to figure out how, or even why, it would be showing source files from another project.

    This only happens when debugging with the 1.0 project. This never happens when debugging 2.0 project. This leads us to think it’s a config issue, not a bug, as it’s never happened before with any other projects. Just this one. One way I’ve gotten around this is to have just a single project and when I want to work in another version I open the context menu and choose “Switch to another Branch or Version”. But this rebuilds the project everytime and is thus time consuming. Are we using MyEclipse correctly for this situation?

    This is a web project using Tomcat 5.0.28. I am using Eclipse 3.1M6, MyEclipse 3.8.4M6. But one of the developers having this same issue is still using 3.8.2 MyEclipse and 3.0 Eclipse.

    Karl

    #231205 Reply

    Riyad Kalla
    Member

    Karl,
    This is actually a “feature”. Because debuggable apps can contain code from multiple projects, the source lookup algorithm in the debugger is stepping through the code of all open projects looking for aptly named files… if you share file names between your two products (Which I’m sure is true in this case) you will get conflicts like this. The best thing to do is shut down the app server, close the project you aren’t using then fire the app server back up and debug that way.

    #231236 Reply

    kcole
    Member

    Thank you. That did the trick.

    Regarding Java source files, does the algorith look at just the file name or does it look at the package name too? For example, is com.karl.myclasses.Person in project A different than com.karl.Person in project B?

    Thanks,
    Karl

    #231264 Reply

    Scott Anderson
    Participant

    Karl,

    It looks at the package name as well.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Debugger brings up wrong source file

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