Talks: Rewind: Python Time-Travel Debugger

Friday - May 17th, 2024 11:45 a.m.-12:15 p.m. in Ballroom A

Presented by:

Description

Debugging is one of the hardest parts of our jobs. Experienced developers shrug it off as an inevitability of life, but it's one of the biggest obstacles standing in the way of newcomers. While working as a mentor, the pain of this fact became ever so vivid for me. Inspired by Bret Victor's "Inventing on Principle" and Redux, I went on a quest to find out if time-travel debugging was possible.

In my journey, I created a time-travel debugger for Python: Rewind. Rewind is a fork of CPython. It works by logging each state change to a file as the Python interpreter runs. Then, another program reads back the log file, recreates all historical states of the program and saves them to a database. A debugger GUI allows the user to step through the program line by line both forward and backward.

Developing software using a time-travel debugger is a uniquely pleasant experience. It removes the anxiety of using a regular step debugger by allowing you to "undo". It's often more productive to start at the end where an error occurred, then step in reverse to go towards its cause. Moreover, omniscience - knowing all historical states of the program before hand - allows us to rethink what a debugger user interface can be.

The talk will be fast paced. In addition to slides, I'll be voicing over some pre-recorded animations / videos in the style of YouTube documentaries. Demos are pre-recorded so there will be no risk of things going wrong live.