Debugger

class Debugger[source]

Bases: BaseDebugger

Store executed instructions and wrap raised errors.

try_perform(instruction: BaseInstruction, *args, **kwargs)[source]

Execute an instruction and convert failures to debug exceptions.

Parameters:
  • instruction (BaseInstruction) – Instruction to execute.

  • args – Positional arguments passed to the instruction.

  • kwargs – Keyword arguments passed to the instruction.

Raises:

DebugException – If the instruction raises an exception.

clear_context()[source]

Clear the stored instruction log.