Other than that, debuggers are very superior to print statements and such. You can’t pause a print statement and inspect the objects you didn’t print!
Other than that, debuggers are very superior to print statements and such. You can’t pause a print statement and inspect the objects you didn’t print!
Would you be willing to use one of those?
This may also contain further pointers that I missed: https://softwareengineering.stackexchange.com/questions/1815...
I looked through there; I code in Python for work (Lua at home a lot), so I didn't see anything that seemed to be targeted towards that use case. I've also seen tools like rr that record a session, but I specifically want to be able to step back and forth while executing code. I would use anything that, at minimum, would allow me to set a "save point" like a breakpoint and then return to that save point from any breakpoint, or from paused execution if I am stepping through the code.
I think it would be easier for Python, Lua, or other dynamic, interpreted languages to do this because you could store the program state via storing the interpreter's internal state more easily.
Also, I understand side-effects would complicate this and I am willing to ignore those issues if I had a bare-bones reversible debugger for Python.