HOME

TheInfoList



OR:

Time travel debugging or time traveling debugging is the process of stepping back in time through
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
to understand what is happening during
execution Capital punishment, also known as the death penalty and formerly called judicial homicide, is the state-sanctioned killing of a person as punishment for actual or supposed misconduct. The sentence ordering that an offender be punished in ...
of a
computer program A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. It is one component of software, which also includes software documentation, documentation and other intangibl ...
. Typically,
debugging In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs. For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
and
debuggers A debugger is a computer program used to software testing, test and debugging, debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, stepping (debuggin ...
, tools that assist a user with the process of debugging, allow users to pause the execution of running
software Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications. The history of software is closely tied to the development of digital comput ...
and inspect the current state of the program. Users can then step forward in time, stepping into or over
statements Statement or statements may refer to: Common uses *Statement (computer science), the smallest standalone element of an imperative programming language * Statement (logic and semantics), declarative sentence that is either true or false *Statement, ...
and proceeding in a forward direction. Interactive debuggers include the ability to modify code and step forward based on updated information. 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.


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 In computer science, purely functional programming usually designates a programming paradigm—a style of building the structure and elements of computer programs—that treats all computation as the evaluation of function (mathematics), mathematic ...
language helps due to the self-contained nature of
pure function In computer programming, a pure function is a function that has the following properties: # the function return values are identical for identical arguments (no variation with local static variables, non-local variables, mutable reference ...
s. Pure functions have no
side effects In medicine, a side effect is an effect of the use of a medicinal drug or other treatment, usually adverse but sometimes beneficial, that is unintended. Herbal and traditional medicines also have side effects. A drug or procedure usually used ...
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 Hot swapping is the replacement or addition of components to a computer system without stopping, shutting down, or rebooting the system. Hot plugging describes only the addition of components to a running computer system. Components which ha ...
, the ability to modify code as the code is running, provide some of the requirements necessary to rewind, and potentially rewrite execution. * 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.


Time traveling debuggers

Examples of debuggers with the ability to step backwards:


See also

*
Interactive computing In computer science, interactive computing refers to software which accepts input from the user as it runs. Interactive software includes commonly used programs, such as word processors or spreadsheet applications. By comparison, non-interactiv ...
* List of purely functional programming languages * Record and replay debugging


References

* * Human–computer interaction {{programming-software-stub