Hmm... My teacher, some of my classmates and I are going to build a Debugger project. We hope that our debugger is interactive, that is, when codes are typed in, the result will be displayed somewhere few seconds later, and the result changes while the input code changes. On the other hand, while running, we can rollback to the former line or breakpoints.
In accordance with my teacher's word, the technique "Time Travel Debugging" will be involved while programming. I searched some project that maintained by others but I can poorly understand the code and there are no introductions about this technique in any of those README files.
reference: https://github.com/mattgodbolt/compiler-explorer
Time travel debugging refers to the ability step forward and backward through the state of you application, empowering the developer understand exactly what is happening at any point in the app's lifecycle.
The Redux DevTools records dispatched actions and the state of the Redux store at every point in time. This makes it possible to inspect the state and travel back in time to a previous application state without reloading the page or restarting the app.
Simply open the Replay browser, then go to the page you want to record. Record and press save. Share with your teammates via links.
This is most commonly known as "time travel debugging", and is often associated with "Functional Reactive Programming". (Those are terms which you can easily search.) There are some reasonably accessible documents on the Elm Language blog (for example, time travel made easy), but I'd suggest you start at the beginning rather than diving into the middle and having to time travel your understanding (some pun intended :-))
Strictly speaking, time travel debugging is something that happens at runtime, but it is much easier if you are programming in a functional language (such as Haskell, Elm, OCAML, or various others, for which time-travelling debuggers have been implemented), and compiling these languages (yes, they are compiled) involves some interesting concepts.
Elm compiles to javascript, which makes it relatively easy to experiment with.
Have fun with the project.
Time travel debugging is also known as reverse debugging. In layman terms, you can debug the same lines again and again (without stopping/restarting the app).
For example, you're debugging a method which threw an exception at line 10, to find the cause of exception you can again execute that method from a prior point let's say line 4 without restarting the complete debugging process. it's all real-time and pretty efficient.
I've used this feature in Visual Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With