debugger

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BreakpointConfig

type BreakpointConfig struct {
	BreakBefore  []string // step names/IDs to break before
	BreakAfter   []string // step names/IDs to break after
	BreakOnError bool     // break on any step failure
	StepMode     bool     // break before every step
}

BreakpointConfig defines where execution should pause.

type DebugAction

type DebugAction int

DebugAction is the user's response at a breakpoint.

const (
	ActionContinue DebugAction = iota // run this step and continue
	ActionSkip                        // skip this step
	ActionRetry                       // re-run previous step
	ActionShell                       // open interactive shell
	ActionInspect                     // show step details
	ActionQuit                        // abort the run
)

type Debugger

type Debugger struct {
	// contains filtered or unexported fields
}

Debugger manages breakpoints and step-by-step execution.

func New

func New(cfg BreakpointConfig) *Debugger

New creates a new Debugger.

func (*Debugger) HandleBreakpointAfter

func (d *Debugger) HandleBreakpointAfter(step *workflow.Step, result *types.StepResult) (DebugAction, error)

HandleBreakpointAfter handles a post-step breakpoint. Returns the action to take.

func (*Debugger) HandleBreakpointBefore

func (d *Debugger) HandleBreakpointBefore(step *workflow.Step, index int, jobCtx interface{}) (DebugAction, error)

HandleBreakpointBefore handles a pre-step breakpoint. Returns the action to take.

func (*Debugger) InspectStep

func (d *Debugger) InspectStep(step *workflow.Step, index int)

InspectStep prints detailed information about a step.

func (*Debugger) IsEnabled

func (d *Debugger) IsEnabled() bool

IsEnabled returns true if any breakpoint config is set.

func (*Debugger) OpenShell

func (d *Debugger) OpenShell(openFn func(containerID, workDir string) error) error

OpenShell drops into an interactive shell in the container. This requires the docker client to be passed in.

func (*Debugger) SetContainer

func (d *Debugger) SetContainer(id, workDir string)

SetContainer sets the container ID for shell access.

func (*Debugger) ShouldBreakAfter

func (d *Debugger) ShouldBreakAfter(step *workflow.Step, result *types.StepResult) bool

ShouldBreakAfter returns true if execution should pause after this step.

func (*Debugger) ShouldBreakBefore

func (d *Debugger) ShouldBreakBefore(step *workflow.Step, index int) bool

ShouldBreakBefore returns true if execution should pause before this step.

Jump to

Keyboard shortcuts

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