On Mon, Oct 29, 2018 at 11:59 AM, Chris Jerdonek
<chris.jerdo...@gmail.com> wrote:
> A simpler feature that could possibly help him (assuming there isn't any
> external state to deal with) would be the ability to save everything at a
> certain point in time, and then resume it later. He could rig things up to
> save the state e.g. after every hour: 1 hour, 2 hours, etc. Then if an error
> occurs after 2.5 hours, he could at least start resuming after 2 hours. This
> could be viewed as a cheap form of a reverse debugger, because a reverse
> debugger has to save the state at every point in time, not just at a few
> select points.

That's very difficult to implement without help from the operating
system, but there is prior art...

On Unix, you can use fork() as a hacky way to do this – fork() off a
process every once and a while, and have the children enter some kind
of loop waiting for instructions (continue / enter debugger / exit /
...).

Or, on Linux, there's: https://www.criu.org/

I also wonder if it would be useful to give pdb the ability to break
when an exception is *raised*, rather than when it's caught?

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to