15

Microsoft has recently announced "Intellitrace", a killer feature for VS2010 IMHO.

Basically it records some of the instructions the program ran (specifically function calls), and allows you to easily look through the execution log.

Is there a similar feature for open source tools? Specifically such a feature for Java with Eclipse integration would be a nice thing to have.

Elazar Leibovich
  • 32,750
  • 33
  • 122
  • 169
  • does Intellitrace work with multi-threaded app? Allowing to replay every single instruction back and forth in time, including across several threads? If it can, this is huge stuff indeed. If it can't, it's just yet another time travel debugger. – SyntaxT3rr0r Apr 11 '10 at 19:07
  • 2
    Haven't tested it yet, but http://msdn.microsoft.com/en-us/magazine/ee336126.aspx says: "The summary page gives me a lot of information about what the IntelliTrace file contains. At the top of the page, I’m given a timeline view of the threads in the application.". I'm telling you, MS would regain its monopoly by the shear quality of their products. Developers will flock away from Java, to C#, which would naturally draw customers to WinMo7, draw servers to IIS etc. – Elazar Leibovich Apr 11 '10 at 21:48
  • @WizardOfOdds and BTW, is there a mature time travel debugger framework for Java? – Elazar Leibovich Apr 11 '10 at 21:49
  • 2
    IntelliTrace does work with multi-threaded apps. IntelliTrace does not record all instructions the program ran. For more information on what is recorded take a look at this: http://blogs.msdn.com/ianhu/archive/2010/03/16/intellitrace-what-we-collect.aspx – Evan Apr 12 '10 at 05:08
  • I agree it would be a killer feature, if people could afford it. In Ultimate, its probably priced out more devs toolkit – Steve Apr 12 '10 at 07:24
  • See also [Are there any open source alternatives to ReplayDirector/Chronon Debugger?](http://stackoverflow.com/questions/9093866/are-there-any-open-source-alternatives-to-replaydirector-chronon-debugger) – Robin Green Mar 18 '12 at 07:38

4 Answers4

9

I am biased of course, but you may want to look at Chronon

pdeva
  • 43,605
  • 46
  • 133
  • 171
  • Chronon is useful, but it is not open source, and nor is it even free for open source projects! – Robin Green Mar 18 '12 at 07:19
  • 4
    Chronon is now free for open source projects: http://eblog.chrononsystems.com/chronon-free-for-open-source-projects – pdeva Apr 04 '12 at 23:11
6

gdb 7.0 features a similar feature called ProcessRecord. It lacks the gui though.

It allows things like:

Program received signal SIGSEGV, Segmentation fault.
0x00401150 in main () at try.c:3
3       printf("%d\n",*x);
(gdb) p x
$1 = 0x0
(gdb) watch x
Watchpoint 1: x
(gdb) reverse-continue
#...find out who was the last one to touch x
Elazar Leibovich
  • 32,750
  • 33
  • 122
  • 169
4

This is sometimes called 'Time travelling debugging', because it gives you the ability to 'step back in time' and check out the state of your program. A quick google search turns up this talk about eclipse support for something similar (from back in 2006 apparently!).

EDIT:

As Elazar pointed out in the comments, that eclipse tool is for C-based development, not java. However, it looks like Omniscient Debugger is a temporal debugger for Java. Seems like a bit of a dead project though, which is a bit surprising.

Pete Hodgson
  • 15,644
  • 5
  • 38
  • 46
  • It's just for CDT unfortunately, which means no Java support. Is it based on the `gdb` Record feature I mentioned? – Elazar Leibovich Apr 11 '10 at 18:45
  • eclipsecon.org link is broken. – Kevin Williams Jun 14 '11 at 17:15
  • Unfortunately I was [unable to get Omniscient Debugger to work at all](http://stackoverflow.com/questions/9686946/how-to-use-omniscient-debugger) on Java 6. – Robin Green Mar 18 '12 at 07:22
  • It's not about "time traveling" -- it's about debugging what happened on someone else's machine when they submit a bug -- your QA can attach an .ITrace file to the bug they submit, and you can step through the code and see exactly what happened. – BrainSlugs83 Jun 11 '13 at 05:52
1

You can always hack it yourself using AOP frameworks such as AspectJ - Logging is one of the most commonly mentioned aspects.

Little Bobby Tables
  • 5,261
  • 2
  • 39
  • 49