Bug 339465 - When debugging Java, saving a snapshot of the loaded objects would be very helpful
Summary: When debugging Java, saving a snapshot of the loaded objects would be very he...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 00:54 EST by Mariano Eloy Fernández Osca CLA
Modified: 2011-03-11 02:13 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mariano Eloy Fernández Osca CLA 2011-03-10 00:54:53 EST
Build Identifier: 20100917-0705

I think it would be useful if Eclipse provided the ability to save a snapshot of the local objects (as shown in the "Variables" view of the Debug perspective). 
I'd like to elaborate on the utility with an example.

Say an Exception's raising in line 100 of some Class. We've toggled a breakpoint in that method() to see what's going on. The whole system is running when execution stops at this breakpoint.

Now let's say we clearly see why the method is failing. Right now I'd like to reproduce this on a Unit Test to ensure the patch applied will work fine.

To Unit Test it I'd need to reproduce the failure conditions: the method's parameters and other objects its using, like Class's attributes.

If only I could take a snapshot of that. 

It would be enouhg to mock all live objects, wouldn't it? For every parameter and attribute I could have a Mock object that would be part of the setup() method of my Unit Test.

The point is being able to reproduce the minimum systems' conditions for that moment later in a Unit Test.



Reproducible: Always

Steps to Reproduce:
Does Not Apply.
Comment 1 Mariano Eloy Fernández Osca CLA 2011-03-11 02:13:54 EST
I just wanted to say that, would this RFE be interesting for the Eclipse Community, I'd be delighted to contribute if some mentoring would be available.