time travel debugging

{{short description|Stepping back in time through source code}}

Time travel debugging or time traveling debugging is the process of stepping back in time through source code to understand what is happening during execution of a computer program.{{Cite news|url=https://blogs.msdn.microsoft.com/windbg/2017/09/25/time-travel-debugging-in-windbg-preview/|title=Time Travel Debugging in WinDbg Preview!|work=Debugging Tools for Windows|access-date=2018-05-08|language=en-US}} Typically, debugging and debuggers, tools that assist a user with the process of debugging, allow users to pause the execution of running software and inspect the current state of the program.{{Cite book|url=http://dl.acm.org/citation.cfm?id=558487|title=The Science of Debugging|last1=Telles|first1=Matthew|last2=Hsieh|first2=Yuan|date=2001-04-01|publisher=Coriolis Group Books|isbn=9781576109175}} Users can then step forward in time, stepping into or over statements and proceeding in a forward direction.{{cite web|url=https://undo.io/resources/whitepapers/reverse-debugging-whitepaper/#introducing-reverse-debugging|title=Reverse debugging, time travel debugging|website=undo.io|date=9 January 2013 |access-date=2018-05-08}} Interactive debuggers include the ability to modify code and step forward based on updated information.{{Cite news|url=https://dzone.com/articles/interactive-debugging-with-nodejs|title=Interactive Debugging With Node.js - DZone Web Dev|work=dzone.com|access-date=2018-05-08|language=en}} Reverse debugging tools allow users to step backwards in time through the steps that resulted in reaching a particular point in the program. Time traveling debuggers provide these features and also allow users to interact with the program, changing the history if desired, and watch how the program responds.{{cite web|url=http://debug.elm-lang.org/|title=Elm's Time Travelling Debugger|website=debug.elm-lang.org|access-date=2018-05-08}}

Characteristics supporting bi-directional travel

There are several characteristics that support the ability to move backwards as well as forwards in time.

  • Selecting a purely functional programming language helps due to the self-contained nature of pure functions. Pure functions have no side effects and depend only on the information explicitly provided to the function, providing a repeatable, reliable, replayable path through the code.
  • Languages and debuggers that enable hot swapping, the ability to modify code as the code is running, provide some of the requirements necessary to rewind, and potentially rewrite execution.{{cite web|url=http://elm-lang.org/blog/interactive-programming|title=interactive programming|website=elm-lang.org|access-date=2018-05-08}}{{Cite news|url=https://code-cartoons.com/hot-reloading-and-time-travel-debugging-what-are-they-3c8ed2812f35|title=Hot reloading and time travel debugging: what are they?|date=2015-10-21|work=Code Cartoons|access-date=2018-05-08}}
  • Tools based on the GNU debugger (GDB), available for compatible languages such as C, C++, Go, and Fortran are capable of reverse debugging, but the effort significantly slows interaction.{{cite web|url=https://undo.io/resources/blog-articles/6-things-time-travel-debugging/|title=6 Things You Should Know About Time Travel Debugging|website=undo.io|date=3 January 2015 |access-date=2018-05-08}}

Time traveling debuggers

Examples of debuggers with the ability to step backwards:

class="wikitable"
Language || Debuggers
C++rr for x86 Linux, Undo UDB for Linux{{cite web|url=https://undo.io/udb/|title = UDB - Time Travel Debugger for C/C++}}
RprovDebugR{{cite web|url=https://github.com/provTools/provDebugR|title=ProvTools/provDebugR|date=2018-07-31|website=github.com|language=en-us|access-date=2018-07-31}}
PythonPyTrace{{cite web|url=https://pytrace.com/|title = PyTrace Time Travel Debugger for Python}}
JavaScriptWallaby.js,{{cite web|url=https://wallabyjs.com/docs/intro/time-travel-debugger.html|title=Wallaby.js Introduction: Time Travel Debugger|website=wallabyjs.com|access-date=2020-02-27}} Meiosis Tracer{{cite web|url=https://medium.com/@foxdonut00/you-dont-need-redux-mobx-rxjs-cerebral-6a735b150a02|title=You Don't Need Redux, MobX, RxJS, Cerebral|last=Donut|first=Fox|date=2018-04-29|website=Fox Donut|access-date=2018-05-24}}
C#RevDeBug
JavaRevDeBug for C# and Java,{{cite web|url=https://revdebug.com/doc/tutorial/5.6.0.0/Getting-Started/about-RevDeBug/|title=About RevDeBug|website=revdebug.com|access-date=2020-03-28}} WhyLine for Java,{{cite web|url=https://www.cs.cmu.edu/~NatProg/whyline-java.html|title=Whyline for Java|website=cs.cmu.edu|access-date=2021-01-21}} Undo UDB
ElmElm Debugger, Elm Reactor{{cite web|url=http://elm-lang.org/blog/time-travel-made-easy|title=time travel made easy|website=elm-lang.org|access-date=2018-05-08}}
OCaml[http://caml.inria.fr/pub/docs/manual-ocaml/debugger.html ocamldebug]
GoUndo UDB for Linux{{cite web|url=https://www.infoq.com/podcasts/debugging-record-replay-data|title= Greg Law on Debugging, Record & Replay of Data, and Hyper-Observability}}
RustUndo UDB for Linux{{cite web|url=https://www.infoq.com/podcasts/debugging-record-replay-data|title= Greg Law on Debugging, Record & Replay of Data, and Hyper-Observability}}
Windows NativeMicrosoft Time Travel Debugging (TTD) Tool{{cite web|url=https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/time-travel-debugging-overview#what-is-time-travel-debugging|title=Time Travel Debugging - Overview|last=DOMARS|website=docs.microsoft.com|language=en-us|access-date=2018-05-08}} for native Windows software (x86, x64, ARM, ARM64{{cite web|url=https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86?activetab=pivot:regionofsystemrequirementstab|title = Get WinDbg Preview| website=Microsoft }}),

eShard [https://eshard.com/esreverse esReverse] Full System Time Travel Analysis for Windows{{cite web|url=https://eshard.com/esreverse|title=Full System Time Travel Analysis for Windows}}

Linux NativeeShard [https://eshard.com/esreverse esReverse] Full System Time Travel Analysis for Linux{{cite web|url=https://eshard.com/esreverse|title=Full System Time Travel Analysis for Linux}}
AndroideShard [https://eshard.com/esreverse esReverse] Full System Time Travel Analysis for Android{{cite web|url=https://eshard.com/esreverse|title=Full System Time Travel Analysis for Android}}

See also

References

{{reflist}}

*

*

Category:Human–computer interaction

{{programming-software-stub}}