Closed ymyke closed 1 year ago
It is possible using the Screen.open() and Screen.close() methods, but as you can see in the docs, that means you have a new screen object after the open call and so need to plumb that through to the rest of your code.
I guess you could make use of the existing logic to resize and throw a new exception that you catch in the main loop, close the screen and invoke the debugger, but you will lose some program state. I typically use logging rather than pdb for this reason.
That works great, thank you! (In my case, the view containing the Screen is stored in a global variable anyway so it's no issue to update it.)
Hi @peterbrittain –
Is there a way to leave and re-enter asciimatics mode? I.e., to close and reopen the
Screen
?Use case: To open a
pdb
session at some point in my program and inspect the state, ideally with the ability to continue the program afterwards.