pub trait Debugger: Send + Sync {
// Required method
fn at(&self, stop: &Stop<'_>) -> Resume;
}Expand description
Something that watches a run, one instruction at a time.
The machine’s whole contract with it is Debugger::at: while a debugger
is installed the machine asks before every instruction, and honours the
answer. Every policy is the implementor’s — a breakpoint is an at
that answers Go until the pc is one it is looking for, a step is one
that counts, a finish is one that watches the depth — because a policy
in the loop is a policy that cannot be changed without touching the loop.
Send + Sync because a spawned task’s machine is handed the same
reference and asks it from that task’s own thread. A debugger that keeps
state therefore keeps it behind a lock or an atomic, as any two threads
sharing anything must.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".