I would like to see the current execution line highlighted in green with arrow开发者_JS百科 at the left in my Eclipse Debug perspective.
Unfortunately I don't know how to set it. I have seen it in some Eclipse platform and wondering if I can set it to display.
I am using Eclipse Ganymede 3.4.2.
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.
Check your class path and be sure the project source directory is in there. If you are debugging an enterprise application clean temp and working directories and republish your application.
For others, if it can solve yours. 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.
I get this from time to time and haven't been able to pin down the root cause but usually it resolves itself if I terminate the debugger, close the source code window with the breakpoint and then restart the debugger. When the breakpoint is hit Eclipse is forced to re-open the source window and then the breakpoint line is highlighted and Eclipse appears to highlight lines going forward.
My problem was that I hadn't terminated the debugger. Clicking the red square terminate button (shown in the screenshot below) and then running the debug again made the current line show up highlighted again.
DebugConfigurations > Source tab > Add... > Java Project > Select All (or select your project) > Ok > Ok > Apply Relaunch debugger
i just repost what Sudhanshu has writen, it worked very well for me.
精彩评论