debugger

package
v1.0.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package debugger defines debugger state and event semantics shared by Ferret Wire clients and servers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandResult

type CommandResult struct {
	Event *apidebugger.Event
	Error error
}

CommandResult preserves an event independently of its sanitized command error.

type Event

type Event struct {
	Sequence uint64
	Kind     EventKind
	Snapshot Snapshot
}

Event carries an ordered debug-session snapshot.

type EventKind

type EventKind uint8

EventKind identifies an ordered debug state transition. Started and continued events remain distinct even though both carry a running snapshot.

const (
	EventStarted EventKind = iota + 1
	EventContinued
	EventStopped
	EventCompleted
	EventFailed
	EventTerminated
	EventCreated
)

Debug event kinds preserve creation, initial start, resume, stop, and terminal transitions.

type Snapshot

type Snapshot struct {
	State            State
	StopReason       apidebugger.Reason
	Location         *source.Range
	HitBreakpointIDs []apidebugger.BreakpointID
	Depth            int
	Output           *api.Output
	Failure          *failure.Failure
	CommandResult    *CommandResult
}

Snapshot is the semantic state published for a remote debug session.

type State

type State uint8

State describes the lifecycle state in a debugger Snapshot.

const (
	StateCreated State = iota + 1
	StateRunning
	StateStopped
	StateCompleted
	StateFailed
	StateTerminated
)

Debug states distinguish an unstarted session, active commands, stops, and terminal outcomes.

func (State) Terminal

func (state State) Terminal() bool

Terminal reports whether the debug session has reached a final state.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL