4

I am debugging a program, and once I step in an instruction, I get a list of variables in the Variables view, or if I hold the mouse on the variable, the its value is shown.

Now, I have an object that could possibly have many references to other objects, which, in turn, have their own attributes that contain other objects and so on. The search space could become very large. I would like to find where these values could be by searching the object attributes by value. Eclipse already searches these objects by attribute.

I tried EVars plugin, but it doesn't seem to be still compatible with Eclipse 4.4. Any other tools or recommendations on how to do it?

Thank you very much!

  • 2
    Having an object with hundreds of attributes... Not good. Also, I am glad to use IDEA 14 with its great debugger showing the values right of the variables. – Arthur Eirich Jun 23 '15 at 20:05
  • 1
    I meant that it has many references to other objects, that in turn have their own references to other objects and so on. So I'd like to find where a certain value is from the object's perspective. I am reverse engineering a piece of software that has no documentation. – Alexandru Nedelcu Jun 23 '15 at 20:09
  • Well I also often need to see some values of the non primitives, then I just expand the object and search for the needed attributes value. – Arthur Eirich Jun 23 '15 at 20:11
  • 1
    Have a look at this. it might help in the long term http://stackoverflow.com/questions/21260318/eclipse-variables-view-expand-all-nodes – Jegg Jun 23 '15 at 20:15

1 Answers1

0

While debugging you can use the "Display" window where you can write pieces of code and "execute" them with inspect (highlight the code -> right click -> inspect).

In that window you have access to all variables of the breakpoint's context. You could use some java 8 streams snippets to filter your objects.

https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fviews%2Fdisplay%2Fref-display_view.htm

https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-evaluating_expressions.htm

cisk
  • 589
  • 3
  • 13