revdebug.clear()
for example.flush()
exception(type, value, traceback)
sys.exc_info()
.exception(exc)
BaseException
object as would received by except BaseException as exc
.exception()
except
handler and gets the exception information the Python interpreter.setrecmode(mode)
revdebug.Off
, revdebug.Continuous
, revdebug.Live
, revdebug.OnEvent
and revdebug.Crash
. Continuous
and Live
are aliases as are OnEvent
and Crash
.block([clear])
clear
is True
(default) then if this recording block already exists it will be cleared, which mimics the behavior of a newly created isolation block which starts out empty.snapshot(name)
name
is optional and will be an automatically generated increasing sequence name if not provided.snapshotall(name)
snapshot()
except sends all threads.clear([flush])
flush
is True
(default) then if currently live recording then the buffer will be flushed before clearing and no data is lost, otherwise there will be a hole in the live recording where this function cleared the record buffer.clearall([flush])
clear()
except clears all thread buffers.record(obj or path)
gc
or weakref
, bad things will happen. If you turn on recording for a file or a path then that will be remembered so that even if the file or path is not loaded yet, when it gets loaded it will be set accordingly. Turning on recording for a path automatically turns on recording for anything below that path as well. All currently loaded code objects are checked at time of this call and if they match the path they are turned on for recording. This method can also be used as a decorator for functions or classes in the form of @revdebug.record
.norecord(obj or path)
record
except turns off recording.setrecord(obj or path, record)
record
and norecord
except that you pass if you wish to turn on or off recording as the bool record
, this function can not be used as a decorator.recrepr(type, func)
.func()
method will be called with self
as the object and should return a string. Exceptions in this function are suppressed. Also, when writing this simple function for stringifying an object please do not to start a new thread, process, or execute another program from within it. Also please avoid interactions with locks, semaphores and or thread-safe queues or other objects. This is all because this function is called from a critical section with thread switching disabled to avoid buffer corruption while serializing, so anything that waits for something from another thread will block indefinitely.