facebook

Source Lookup Problem when debugging on JBoss 4.0.0

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

    whmanutd
    Member

    Hi, all,

    I think I tried hard, but still couldn’t solve this problem.

    I have two web projects of different version, on the same workspace. One is named “test” and the other is “test_1”.

    After I deployed “test_1” to the local JBoss 4, and started debugging, I found out the source code displayed (in the “debug” prospective) was actually come from “test” project.

    I understood that we can configure the “source lookup”/”source” option in the debug dialog, and actually I put “test_1” project in the “source lookup” option for both “JBoss 4.0.x” and the remote “jboss4Server”. However, I still saw the “test” project’s source code when debugging “test_1”.

    Is it a problem with “Eclipse” or “MyEclipse”? Is there any workarounds? (without creating a new workspace, or deleting the “test” project, or renaming “test” to “test_2”)

    Thanks a lot.

    Chris

    PS.

    About the Environment
    –OS: WinXP
    — Eclipse: version 3.0.2
    — MyEclipse: version 3.8.4
    — JDK: version 1.4.2_07
    — JBoss: version 4.0.0

    #227828 Reply

    Riyad Kalla
    Member

    Chris,
    Are these two projects very similar? Do the have similar names files/etc?

    The reason for this is that when the source locator runs all open Eclipse projects are searched, so be sure to close any projects you don’t need during debugging to not only avoid this, but to speed it up.

    #227981 Reply

    whmanutd
    Member

    Hi, Riyad,

    Thank you for your reply!

    Those two projects are almost identical, except few changes on some files. I’ve already tried to close one of the projects (“test” in my scenario), but still got its source code displayed, in the debugging mode. The only way that worked for me was to delete the “test” project completely.

    Ideally, we should be able to customize those “source lookup” options, to resolve this problem. However, no matter how I change those options, the results were the same.

    This was not convenient for the people who are working on two branches of the code, though a new workspace could be created to avoid the problem.

    Any more clues?

    Thanks, and have a nice day!

    Chris

    #227982 Reply

    Riyad Kalla
    Member

    I’ve already tried to close one of the projects (“test” in my scenario), but still got its source code displayed, in the debugging mode. The only way that worked for me was to delete the “test” project completely.

    This might sound silly, but since the projects are so similar, are you sure it was displaying the code from the closed project? This shouldn’t be techincaly possible…

    Any more clues?

    I imagine this will change quite a bit with our 5.0 release, until then we will have to make due with the behaviors that the source locator is providing.

    I wonder if instead of using separate workspaces you used Working Sets, would that do the trick?

    #227983 Reply

    whmanutd
    Member

    Hi, riyad,

    It is not that silly. Since some files are changed from project “test” to “test_1”, once I traced into those changed files, the old content from “test” got displayed. That is how I noticed this problem, and this problem kept misleading me.

    Another simple/tricky way to identify the problem is the use the “Link with Editor” button in the “Package Explorer” View, then you can see the source is from which project.

    I understand the “Working Sets” concepts, and use it all the time. I don’t want to create a new workspace, since all my settings are gone in the new workspace, but no other workarounds.

    As far as I know, Eclipse platform provide this kind of “source locator” interface, and it is up to the plug-in provider to implement it. I am afraid this implementation is not handled properly (or I didn’t use it correctly, I wish I was wrong).

    What I did is:
    1. From Menu “Run” -> “Debug”, to bring up the “Debug” dialog.
    2. Select the JBoss 4.0.x instance I config.
    3. On the right hand side, select the “Source” tab.
    4. Use “Add” button to add the “source lookup path”.

    I also tried the similar thing on the “Remote Java Application” part.

    This problem was not just happened to me, a lot of friends/collegues who were working on more than one branches got the same problem.

    Thanks a lot for your prompt reply though.

    Regards,

    Chris

    #227984 Reply

    Riyad Kalla
    Member

    Another simple/tricky way to identify the problem is the use the “Link with Editor” button in the “Package Explorer” View, then you can see the source is from which project.

    Are you not actually *closing” the other project? You need to close it (Right click on project > Close Project)… are you just closing all the editors or collapsing the tree, if so that is not enough.

    As far as I know, Eclipse platform provide this kind of “source locator” interface, and it is up to the plug-in provider to implement it. I am afraid this implementation is not handled properly (or I didn’t use it correctly, I wish I was wrong).

    I will ask if we can enhance this.

    What I did is:
    1. From Menu “Run” -> “Debug”, to bring up the “Debug” dialog.
    2. Select the JBoss 4.0.x instance I config.
    3. On the right hand side, select the “Source” tab.
    4. Use “Add” button to add the “source lookup path”.

    Is this how you have been running JBoss? The way MyEclipse is designed to be run is for you to configure JBoss via our connector interface, then launch JBoss using our app server dropdown as outlined here: http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/appservers/index.html

    Which is independent of the standard Eclipse Run/Debug functionality.

    #227987 Reply

    whmanutd
    Member

    @support-rkalla wrote:

    Another simple/tricky way to identify the problem is the use the “Link with Editor” button in the “Package Explorer” View, then you can see the source is from which project.

    Are you not actually *closing” the other project? You need to close it (Right click on project > Close Project)… are you just closing all the editors or collapsing the tree, if so that is not enough.

    I think I closed the project properly, using the same procedure(Right click, Close Project).

    The logic behind the “Link with Editor” approach was:
    When I clicked the “link with Editor” button, although that editor could not link with a closed project (“test” in this case), it should link with the source code in “test_1” project (still open), if everything was alright. And the corresponding source file will be highlighted in the “Package Explorer” view. However, this (highlighting) was not happening.

    So my conclusion is: the source code was still from the closed “test” project.

    What I did is:
    1. From Menu “Run” -> “Debug”, to bring up the “Debug” dialog.
    2. Select the JBoss 4.0.x instance I config.
    3. On the right hand side, select the “Source” tab.
    4. Use “Add” button to add the “source lookup path”.

    Is this how you have been running JBoss? The way MyEclipse is designed to be run is for you to configure JBoss via our connector interface, then launch JBoss using our app server dropdown as outlined here: http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/appservers/index.html

    Which is independent of the standard Eclipse Run/Debug functionality.

    My local Jboss server is configured through the connector interface, otherwise too complicated for me. 🙂 Usually, we can configure a little more through the “Debug” dialog.

    Cheers,

    Chris

    #228039 Reply

    Riyad Kalla
    Member

    I will look into this and track this bug in an internal issue for us. Thank you for reporting it, it does seem we need to fix something here, although I can garuntee you it will be after 4.0 sometime (our devs are stretched to the max right now).

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Source Lookup Problem when debugging on JBoss 4.0.0

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