debugger

package
v4.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

Define what can be debugged

Functions

This section is empty.

Types

type BreakpointManager

type BreakpointManager struct {
	Breakpoints map[string]bool
}

func NewBreakpointManager

func NewBreakpointManager() *BreakpointManager

func (*BreakpointManager) Clear

func (bm *BreakpointManager) Clear()

func (*BreakpointManager) Has

func (bm *BreakpointManager) Has(file string, line int) bool

func (*BreakpointManager) Remove

func (bm *BreakpointManager) Remove(file string, line int)

func (*BreakpointManager) Set

func (bm *BreakpointManager) Set(file string, line int)

type CallStack

type CallStack []StackFrame

func DeepCopyCallStack

func DeepCopyCallStack(stack CallStack) CallStack

DeepCopyCallStack creates a deep copy of the call stack

type Debugger

type Debugger struct {
	BreakpointManager BreakpointManager
	Environment       *environment.Environment
	State             State
	CurrentFile       string
	CurrentLine       int
	CallStack         CallStack
	Snapshots         Snapshots
	// contains filtered or unexported fields
}

func NewDebugger

func NewDebugger(env *environment.Environment) *Debugger

func (*Debugger) Continue

func (d *Debugger) Continue() error

func (*Debugger) IsDebuggable

func (d *Debugger) IsDebuggable(nodeType ast.NodeType) bool

func (*Debugger) Pause

func (d *Debugger) Pause() error

func (*Debugger) PopFrame

func (d *Debugger) PopFrame()

func (*Debugger) PushFrame

func (d *Debugger) PushFrame(frame StackFrame)

func (*Debugger) ShouldStop

func (d *Debugger) ShouldStop(filename string, line int) bool

func (*Debugger) StepInto

func (d *Debugger) StepInto() error

func (*Debugger) StepOut

func (d *Debugger) StepOut() error

func (*Debugger) StepOver

func (d *Debugger) StepOver() error

func (*Debugger) TakeSnapshot

func (d *Debugger) TakeSnapshot()

func (*Debugger) WaitIfPaused

func (d *Debugger) WaitIfPaused(nodeType ast.NodeType)

type Snapshot

type Snapshot struct {
	Stack CallStack
	Env   *environment.Environment
}

type Snapshots

type Snapshots []Snapshot

type StackFrame

type StackFrame struct {
	Name     string
	Filename string
	Line     int
}

type State

type State string
const (
	RunningState  State = "running"
	PausedState   State = "paused"
	SteppingState State = "stepping"
)

type StepType

type StepType string
const (
	StepInto StepType = "step_into"
	StepOver StepType = "step_over"
	StepOut  StepType = "step_out"
)

Jump to

Keyboard shortcuts

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