Python Bytecode, Time Travel Debugging, Resurrection, Ante-Mortem Debugging, Interactive Debugging, Resume after Exception, Python ignore all exceptions and continue execute next line in given section of code
lisp-style resumption error-handling semantics
ruby
pry-rescue may not resume execution?
java
hot code replace in vscode for java
python
python lisp-style exception as condition handling
dump different level of reloading call history
reload code blocks which are syntatically different, if black formatter fails after dedent then there shall be error
decide to reload extra parts of functions in the next run if selected
load newly added functions, remove old functions, execute added lines, reload entire module and update namespace depending on condition
check other programming language whether it jas similar capabilities
visit this thread of ruby in archive.org
either bytecode or modify the source code
bookmarks
1 | https://docs.python.org/3/library/code.html |
contextlib usage detail, to make customized “with” statements:
1 | from contextlib import AbstractContextManager |
python grammar sugar: brackets
https://pypi.org/project/brackets/
does that work in eval()?
use contextlib.suppress to replace try…except: pass
might investigate source code of the suppress object.
https://opensource.com/article/18/5/how-retrieve-source-code-python-functions
to execute code grouped by lowest level of indentation, we can def those lines of code and pass the code by dill.source.getsource(functionName) and eval within given global/local variables.
my solution is down here, with concrete examples.
hereby we recommend to insert a conditional return statement to ensure we will exit this buggy code at the best time. maybe we could put it into a dictionary somehow, tuples within string or something.
1 | import dill |