Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight current line of execution in debug perspective in Eclipse

Tags:

java

eclipse

I would like to see the current execution line highlighted in green with arrow 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.

like image 764
Viidhya Avatar asked Jun 30 '11 16:06

Viidhya


People also ask

How do I run the next line in debug mode in Eclipse?

A solution to this is to place the cursor into the next line and hit Ctrl+R ( Run to Line ) but this is not quite as comfortable as simply hitting a button (like hitting F6 for stepping over the line).

How can I see debug points in Eclipse?

Debug Perspective Debug view – Visualizes call stack and provides operations on that. Breakpoints view – Shows all the breakpoints. Variables/Expression view – Shows the declared variables and their values. Press Ctrl+Shift+d or Ctrl+Shift+i on a selected variable or expression to show its value.

How do you move the debug current pointer?

You need to get out of the current debug session. Go to the debug console and end the current session by hitting the red square button. This should remove all the debug current instruction pointers. Save this answer.

How do I show static variables in Eclipse debugger?

Variables. We can see the values of variables during the execution under the Variables view. In order to see the static variables, we can select the drop-down option Java -> Show Static Variables. Using the variables view, it's possible to change any value to the desired value during the execution.


2 Answers

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

like image 144
Tristan Avatar answered Sep 20 '22 13:09

Tristan


I just had to reboot eclipse, and everything started working perfectly.

like image 25
Andrew Lyubovsky Avatar answered Sep 23 '22 13:09

Andrew Lyubovsky