This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 38762 - Should be able to step backwards in execution-time
Summary: Should be able to step backwards in execution-time
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
: 38764 69557 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-14 16:19 UTC by _ gtzabari
Modified: 2014-08-01 17:21 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2004-01-14 16:19:43 UTC
Other (research) frameworks I've seen before
actually allow you to step *backward* in execution
time in order to track down how you got to the
invalid state in the first place. Granted this is
computationally expensive but if we have such
options in Netbeans (optionally enabled) then we
could save *a lot* of time debugging. Instead of
repeating the "run, breakpoint, debug" cycle 10-20
times before you track down a bug you could run it
once and if the problem occured a few lines before
the breakpoint you can track down exactly why
things went wrong.

    This would give us a huge benefit over Eclipse
and all other competitors!
Comment 1 Milan Kubec 2004-01-15 07:50:12 UTC
*** Issue 38764 has been marked as a duplicate of this issue. ***
Comment 2 _ gtzabari 2004-02-09 04:33:26 UTC
Aparently someone has already beat us to it:

http://www.omnicore.com/htmls/newdebugger.html

Omicore is a production Java IDE that supports "back-in-time
debugging". I hope you guys will consider this for Netbeans 4.x

I think this is a killer feature for developers; the question is how
hard it is to implement.
Comment 3 Martin Entlicher 2005-05-13 16:01:02 UTC
True step back would be an overkill IMHO, since we would have to remember all
changes in the heap.

I've downloaded X-develop to see how it works there. They are not changing heap
during step back. Only local variables. Therefore one needs to continually
remember all changes in local variables. This would be almost impossible to do
with JDI, since one would need to stop the debuggee on every variable change and
inspect and remember it's value. That would make debugging almost unusable from
the performance point of view.

X-develop seems to be using JDWP. So this needs to be more deeply explored how
they are doing this...
Comment 4 Martin Entlicher 2005-12-13 10:40:26 UTC
*** Issue 69557 has been marked as a duplicate of this issue. ***
Comment 5 Martin Entlicher 2005-12-13 10:42:24 UTC
As described in issue #69557 - there is a GPLed implementation which actually
does this:
http://www.lambdacs.com/debugger/debugger.html
Comment 6 _ gtzabari 2010-03-13 01:54:57 UTC
Visual Studio 2010 has this feature. I think everyone pretty much agrees that this is a killer feature but that it's not clear how to implement it with a reasonable performance. Microsoft found a way to do it somehow so it must be possible.

It's been 6 years since this request was filed. Please revisit it and find out if anything has changed since then.
Comment 7 _ gtzabari 2010-07-14 04:51:24 UTC
Chronon's authors claim they have managed to implement this with no noticeable performance drop (versus uninstrumented code): http://java.dzone.com/articles/introducing-chronon-time

At the very least, this indicates the concept is feasible.
Comment 8 _ gtzabari 2013-07-04 15:54:21 UTC
9 years later, it's time to re-evaluate this issue. At the very least, someone should look into how Chronon does it.

Take a look at http://chrononsystems.com/what-is-chronon/technology and http://chrononsystems.com/what-is-chronon/performance

Chronon, Visual Studio 2010 and the aforementioned GPL implementation show that numerous people have implemented this feature and without a huge performance impact.

So, what is preventing you from implementing this feature? Lack of demand? Or is it something else?
Comment 9 _ gtzabari 2013-07-19 21:33:17 UTC
Hey! Oracle just integrated JRockit "Flight Recorder" into JDK 7 update 40. According to the docs this will allow you to step back in time using minimal overhead.

Now that this is an officially-supported feature in the JDK, can Netbeans finally add support?
Comment 10 Martin Entlicher 2014-08-01 11:16:01 UTC
I'd really like to add this feature, if the Flight Recorder supports it.
I've read through the documentation at http://docs.oracle.com/cd/E15289_01/doc.40/e15070.pdf specifically the C - Events chapter and I did not find anything about logging of the actual execution, variable values, etc. All what I see are general properties of the execution, GC, threads, etc.
It looks unusable for the debugger to me.
Comment 11 _ gtzabari 2014-08-01 17:21:59 UTC
That's too bad.

Is there a reasonable way to implement this feature in 2014? Or would the performance be too poor?