facebook

debug perspective does not highlight the line of java code

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

    zhangleif
    Member

    I am using MyEclipse 4.1.1 on top of Eclipse 3.1.1 at my Win XP desktop for java web application development under spring framework.

    I have no problem in setting breakpoints in java code, and the Eclipse automatically switchs to Debug perspective when the application reachs the breakpoint. The Thread view and the variables view all looks fine.

    But the source code view does not highlight the source code at the line of the breakpoint, it simply display the same source file under the previous J2EE perspective before debugging. Even after I manually switchs to the java file with breakpoint, it still does not highlight the line with breakpoint. I also noticed that I can click “Stop Over”, “Step Into” etc.. to run the program one step at a time, but the corresponding java code still does not highlight accordingly.

    Can someone tell me why?

    Thanks.

    #265410 Reply

    Riyad Kalla
    Member

    Hmm, sounds like some setting somewhere is confusing things.

    Try to stop debugging, right click in the debug view and remove all break points then restart using the -clean command line argument as outlined here:
    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10280.html

    Let me know if things start behaving after that.

    #265451 Reply

    zhangleif
    Member

    Thanks for your reply.

    But it does not work even after I clear all break points, and restart eclipse.exe by giving “-clean” per the instruction.

    In debug perspective, I am able to click those “stop over”, “step into”.. buttons to run the java code one line at a time, I can even see those variables values are changing while I run the code step by step. However, the line of the java source code does not move accordingly. it always stays the same way like a normal text editor.

    Any further thoughts?

    #265467 Reply

    Riyad Kalla
    Member

    There is one more thing before we try a clean reinstall. That is using a new workspace. Can you try going to File > Switch Workspace and create a new workspace in an area that one doesn’t exist, and then import your project and setup your app server and try debugging again?

    #265495 Reply

    zhangleif
    Member

    Thanks a lot, Riyad, It works after I switched workspae and create a new one!!!

    #265516 Reply

    Riyad Kalla
    Member

    That’s great, I’m glad it’s working.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: debug perspective does not highlight the line of java code

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