I had the same problem after switching a workspace.
Just restarting Eclipse solved it.
(Eclipse Mars v4.5.0)
Answer from chmin.seo on Stack OverflowI had the same problem after switching a workspace.
Just restarting Eclipse solved it.
(Eclipse Mars v4.5.0)
I had similar issue. I see it highlighted, stopped at breakpoint. But I wasn't able to use step by step (F6) debug. Reason was that eclipse stopped due to break point and highlighted/selected top thread in debug.
So I selected current thread, by verifying one by one, till the current code(stopped due to breakpoint) highlighted.
To see threads running add debug view if not shown. Window > Show view > Debug.
This also helped me while debugging 2 threads separately on running programme.
There seems no short keys to locate current Thread from code stopped due to breakpoint.
In debug perspective, double click to the left of a line to set a break point. Once a break point is set, you can highlight running code line by line.
If it doesn't work as expected, just check your preferences here: Window > Preferences > General > Editors > All Text Editors > Annotations > Debug Call Stack and Debug Current Instruction Pointer
I just had to reboot eclipse, and everything started working perfectly.
I found a resolution for the problem. I created a separate Eclipse folder and workspace to ensure a clean installation, and recorded my steps along the way. When the problem persisted in the same manner (working on generic project, not working on jsp-based one) I examined what was there that might influence this and ultimately discovered that a plugin given to me (Sysdeo Tomcat Launcher Plugin) was either broken or outdated (on 3.1.0). This was a folder plugin that adds a dropdown 'Tomcat' option to the File bar in Eclipse. This was added when I first installed eclipse, so since it worked for a while it never occurred that this may be the issue. I removed it and downloaded the latest version (3.3.0) which has fixed the problem. I can't account for it suddenly failing one day, but the problem is now fixed.
Try using the actual Debug button at the top. I ran into this problem just now with only using the Tomcat start button. With the actual bug button, I'm now able to see the highlighted lines.
I had the same issue.
There was a workaround for that by right-clicking on associated callstack line in Debug view and selecting "Lookup Source". After that the current instruction line is (green) highlighted as usual. But I needed to do this after every debug step.
Rebuild all projects didn't help.
The solution: Restart Eclipse and all works fine.
This happens when we make Java code change in file, compiler creates a class but running server has a old copy of your class file. Go with JRebel to get rid of such kind of issues.
Clicking on the top item in the debug trace will do exactly what you want.
In some instances, clicking or double-clicking on the top item in the debug trace view will NOT work, like when you are already viewing the proper file.
Unfortunately there's no guaranteed one-click/keystroke that this works in all situations that I know of. But this works with two clicks:
Click on any line of the debug trace EXCEPT the top line. Then click on the top line.
Good luck with the code (we all have to work in messy environments sometimes!).