Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse debug view current line

Let's say I have 20 classes open and I am debugging the app.

I step the debugger thro its breakpoints. At a certain line, I get distracted and started scrolling thro the current source (which is like 2000 lines long). Then I started wading thro the other 19 source files.

After ten minutes wading, I wish to return to the current debug line. I had even forgotten what class it was. What is the best way? Here are my worst practices:

  • click on the step into icon and then step out
  • click on the step over hoping I don't miss out on anything important.
  • Search for the highlighted line in the long stack of debug trace. Fiddle around to change display to high contrast and then change it back when I locate the line.

All the above is not good practice. If I am not wrong, when I used Visual Studio writing C#, we had a button that brought us right back to the current debug line.

Is there such a button in Eclipse? Why not? If not, has someone a plugin to do that?

Do you have an alternative convenient practice? A plugin would be great.

like image 219
Blessed Geek Avatar asked Aug 12 '11 19:08

Blessed Geek


People also ask

How do I view debug in Eclipse?

Press Ctrl+Shift+d or Ctrl+Shift+i on a selected variable or expression to show its value. You can also add a permanent watch on an expression/variable that will then be shown in the Expressions view when debugging is on.

What is Eclipse drop to frame debugging?

6. Drop to frame. Eclipse enables users to choose any frame (level) in the call stack during the debugging process and set the JVM to start again from the selected level. In simple words, it allows you to re-run a part of your program.

How do you step through in Eclipse?

Simply put, you can run your code in Debug Mode by pressing only F11 or clicking that little bug on the top of the screen. Use F5 to trace into, F6 to step over, CTRL-SHIFT-B to set/remove breakpoints.


1 Answers

Clicking on the top item in the debug trace will do exactly what you want.

like image 190
Bozho Avatar answered Oct 08 '22 18:10

Bozho