pub enum DebugStopReason {
Breakpoint {
id: BreakpointId,
name: String,
},
Watchpoint {
global_idx: u32,
},
Choices,
Step,
AwaitingExternal,
Terminal,
NoStepOutTarget,
NoLineInfo,
}Expand description
Why a debug_run/debug_step call stopped.
Variants§
Breakpoint
An enabled breakpoint’s position was reached, checked before the matching instruction executed.
Watchpoint
A watched global was written (debug_run_watching only).
Choices
A choice point was reached (vm::Stepped::Done with non-empty
pending choices) — the flow is now WaitingForChoice, distinct
from DebugStopReason::Terminal: unlike an actual -> DONE/
-> END, Story::choose followed by
Story::continue_single can
resume the story from here. Turn-index bump and invisible-default
auto-select have already been applied (the same bookkeeping
advance_with_limit performs on this outcome), so a caller that
hands control back to the production API sees consistent state
(issue #3186 review).
Step
The requested step (into/over/out) completed normally.
AwaitingExternal
Execution reached a bound external whose handler deferred
(ExternalResult::Pending) —
the External frame is left intact, exactly as
FlowInstance::advance surfaces
StepOutcome::AwaitingExternal (#3224). The host resolves it
out-of-band (Story::resolve_external,
or resolve_external_flow
for a named flow), then resumes with any debug verb. Synchronously
resolved externals and in-story fallbacks never surface this —
the debug loops run them through
exactly as production advance() does.
Terminal
The flow reached a terminal VM outcome (-> DONE/-> END, or
content otherwise exhausted) before the requested stop condition —
breakpoint, watchpoint, or step target — was reached.
NoStepOutTarget
StepMode::Out was requested from the outermost (Root) frame,
which has no caller to return to — docs/debugger-spec.md §4:
“The debugger must disable step-out… exactly as GDB disables
finish in the outermost frame.” Reported instead of running the
story to its own natural end, which would be a misleading way to
answer “step out of a frame with no caller.”
NoLineInfo
A line-granular step was requested but the artifact cannot say which
line execution is on — no DebugInfo, or a file compiled without
source text so it carries no line index (#3264, #3261).
Reported rather than silently degrading to instruction stepping:
handing someone four-presses-per-line when they asked to advance one
line is how a missing line index becomes a mystery instead of a
legible “this build has no line info”. Mirrors
Self::NoStepOutTarget’s posture — a verb that has nothing to do
here says so.
Trait Implementations§
Source§impl Clone for DebugStopReason
impl Clone for DebugStopReason
Source§fn clone(&self) -> DebugStopReason
fn clone(&self) -> DebugStopReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more