Time travel debugging
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.[1] 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.[2] Users can then step forward in time, stepping into or over statements and proceeding in a forward direction.[3] Interactive debuggers include the ability to modify code and step forward based on updated information.[4] 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.[5]
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, re-playable 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 re-write execution.[6][7]
- 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.[8]
Time traveling debuggers
Debuggers with the ability to step backwards include:
- Elm Debugger[5]
- Elm Reactor[9]
- Meiosis Tracer[10]
- Microsoft Time Travel Debugging (TTD) Tool[11] for native Windows software (x86, x64, ARM, ARM64[12]).
- ocamldebug for OCaml
- UndoDB for Linux and Android
- rr for x86 Linux
- provDebugR for R[13]
- Wallaby.js for JavaScript[14]
- RevDeBug for C# and Java[15]
- WhyLine for Java[16]
See also
References
- ^ "Time Travel Debugging in WinDbg Preview!". Debugging Tools for Windows. Retrieved 2018-05-08.
- ^ Telles, Matthew; Hsieh, Yuan (2001-04-01). The Science of Debugging. Coriolis Group Books.
- ^ "Reverse debugging, time travel debugging". undo.io. Retrieved 2018-05-08.
- ^ "Interactive Debugging With Node.js - DZone Web Dev". dzone.com. Retrieved 2018-05-08.
- ^ a b "Elm's Time Travelling Debugger". debug.elm-lang.org. Retrieved 2018-05-08.
- ^ "interactive programming". elm-lang.org. Retrieved 2018-05-08.
- ^ "Hot reloading and time travel debugging: what are they?". Code Cartoons. 2015-10-21. Retrieved 2018-05-08.
- ^ "6 Things You Should Know About Time Travel Debugging". undo.io. Retrieved 2018-05-08.
- ^ "time travel made easy". elm-lang.org. Retrieved 2018-05-08.
- ^ Donut, Fox (2018-04-29). "You Don't Need Redux, MobX, RxJS, Cerebral". Fox Donut. Retrieved 2018-05-24.
- ^ DOMARS. "Time Travel Debugging - Overview". docs.microsoft.com. Retrieved 2018-05-08.
- ^ https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86?activetab=pivot:regionofsystemrequirementstab
- ^ "ProvTools/provDebugR". github.com. 2018-07-31. Retrieved 2018-07-31.
- ^ "Wallaby.js Introduction: Time Travel Debugger". wallabyjs.com. Retrieved 2020-02-27.
- ^ "About RevDeBug". revdebug.com. Retrieved 2020-03-28.
- ^ "Whyline for Java". cs.cmu.edu. Retrieved 2021-01-21.