Compare two objects in Variable View
Originally posted here:
- https://github.com/eclipse-jdt/eclipse.jdt.debug/issues/203
One thing I recently missed was that I have a breakpoint where it stops and I have two strings in the variable view.
It would helpful to select two String variables (of course would also be usefull for List, Map, ... ) and choose from the context menu "Compare with each other" and then get a Diff-View
I also get this need for "comparative debugging" often, but usually, comparing the variables from 2 different executions, 2 different frames or 2 different stacks in general. As a result, both values I want to compare are not shown in the Variables view simultaneously. the trick I'm using, which is actually pretty easy and efficient, is to open another workbench window (Window > New Window) and to show the same debug perspective, and have 1 window focused on 1 stack frame and the other on another. Then I see the variables from the different frames and can easily compare them.
@laeubi @mickaelistria can you please test/review https://github.com/eclipse-jdt/eclipse.jdt.debug/pull/581 if it resolves you demands?
No, it does not. The Variable view is still populated from a single launch; what I'd like would be compare values from different launches (pinned inspect dialog helps a bit for that). Basically, allowing to add a column in the debug variable view for another launch so expanding the trees allow to the different values it takes on different launches.
@mickaelistria that sounds like another usecase which could be handled separately. It should not render the given PR generally useless, does it?
I think the PR is valid and solves an interesting use-case (comparing 2 random values from the same launch), so IMO this feature provided by the referenced PR is worth being merged.
The Variable view is still populated from a single launch;
For me as a user the Variable view seems to show the first debugee that is selected in the Debug view. The Debug view allows multiselection. Maybe the Variable views could then show variables for all selected debugees and then also allow to compare those?