From bd362a05f0dbfe69e9e74f8e6414cee6e96b37ab Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 28 Jul 2022 09:27:39 -0400 Subject: [PATCH] Run release hook around `next` repl commands as well --- tractor/_debug.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tractor/_debug.py b/tractor/_debug.py index f1ed1a1..f8f7896 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -117,6 +117,15 @@ class MultiActorPdb(pdbpp.Pdb): if _pdb_release_hook: _pdb_release_hook() + def set_next(self, frame): + try: + super().set_next(frame) + finally: + global _local_task_in_debug, _pdb_release_hook + _local_task_in_debug = None + if _pdb_release_hook: + _pdb_release_hook() + # TODO: will be needed whenever we get to true remote debugging. # XXX see https://github.com/goodboy/tractor/issues/130