At the link below it explains that the "display view allows you to manipulate live code in a scrapbook type fashion (see Figure 8). To manipulate a variable, simply type the name of the variable in the Display view, and you'll be greeted with a familiar content assist."
http://www.ibm.com/developerworks/library/os-ecbug/
However, I am having trouble getting it to work. I have the view open but all the buttons are disabled. I have tried putting code in the view, selecting code in the view, selecting code in other views, while running and while not running debug, but the only button that is ever enabled on the view is "clear console".
Suggestions on what I am doing wrong?
Which perspective is used to run a program in debug view? Explanation: We can switch from one perspective to another. Debug perspective shows us the breakpoints, variables, etc.
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.
If Eclipse does not automatically switch to the Debug perspective, you can locate it manually in the Window entry on the menu bar or by clicking the Choose Perspective button (a button with a plus on it) in the upper right corner of the Eclipse window under the menu bar line.
Running a remote debugging session from STS/Eclipse Last, but not least, configure the STS/Eclipse to connect to the service instance: Create a new Remote Java Application Debug Configuration; Select source code project for the service under Project. Specify the debugger port defined above under Connection Properties.
I think this powerful feature should be used way more often.
Window -> Show View -> (search for) Display
myObject.getSomeData();
, you can autocomplete (Ctrl+Space)Not sure why this view is not there by default, it should be !
You can view the Display
view as a place where you can inspect all sorts of variables and boolean expressions during runtime. While your debugger is frozen on a breakpoint start typing the name of an object variable for instance and you'll get autocomplete functionality as you start calling methods or fields to reach deeper class datastructures. Then when you select/mark the portion you need to inspect or everything, the buttons on the Display view will be clickable. You can always perform the Ctrl+Shift+I
shortcut on the selection to view what's the current runtime state of your selection i.e. variable, object, boolean exrepssion etc
As of Eclipse Photon Release (4.8.0)
This same functionality can be performed inside the the Debug Shell
. I do this by:
Debug Shell
Execute Selected Text
, or Display Result of Evaluating Selected Text
I'm including this answer because as of 2018, with the Photon Release, I was unable to get the Display view to work in any capacity or to even show up. But I was able to perform the same work through this method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With