I remember using OCaml a bit and it has a time-travelling debugger. You launch the program with the debugger, it crashes and then you can inspect the program as you wish. I was really impressed by this.
Someone wrote a time-travel debugger for Python, but it seems like a one-off project and I'm not sure if there's an actively maintained/developed tool. https://github.com/TomOnTime/timetravelpdb