Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339465

Summary: When debugging Java, saving a snapshot of the loaded objects would be very helpful
Product: [Eclipse Project] JDT Reporter: Mariano Eloy Fernández Osca <mariano.fernandez>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: remy.suen
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.