Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse - search value of variable during debugging

Tags:

Does eclipse have a way, while debugging, to find variable when I know only its value? Or are there any plugins for this? Thanks.


Sometimes I do not know where the variable is, but I know the value of the variable. If it is an object, I do not know all values or variables, but I know one value. So I would like to find this variable knowing its value.

like image 678
Dan Avatar asked Mar 01 '12 19:03

Dan


People also ask

How can check variable value while debugging 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.

How can you see variable references while debugging?

When stopped in the debugger hover the mouse cursor over the variable you want to look at. The DataTip will appear showing you the value of that variable. If the variable is an object, you can expand the object by clicking on the arrow to see the elements of that object.

Which is not a way to check the value of a variable while debugging in Eclipse?

You can not check local variable unless you are in the method. As local variables have scope of the block of the method, they will be inaccessible unless method is executing and thus you are getting "variable can not be resolved" message.


1 Answers

I have long needed this kind of thing for exploring third-party code at a breakpoint. This eclipse plugin, evars, seems to have potential, but I mostly end up with a very long-running search that results in an eclipse heap space error.

like image 170
Chris Noe Avatar answered Sep 20 '22 22:09

Chris Noe