dbg

package module
v0.0.0-...-1922144 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

README

Yaegi DAP

Yaegi DAP is a debug server compatible with the Debug Adapter Protocol.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter is a DAP handler that debugs Go code compiled with an interpreter.

func NewAdapter

func NewAdapter(eval compileFunc, arg string, opts *Options) *Adapter

NewAdapter returns a new Adapter that debugs Go code located at the given path and compiles it with a given Interpreter compile function.

func NewEvalAdapter

func NewEvalAdapter(src string, opts *Options) *Adapter

NewEvalAdapter returns an Adapter that debugs a Go code represented as a string.

func NewEvalPathAdapter

func NewEvalPathAdapter(path string, opts *Options) *Adapter

NewEvalPathAdapter returns an Adapter that debugs Go code located at the given path.

func (*Adapter) Initialize

func (a *Adapter) Initialize(s *dap.Session, ccaps *dap.InitializeRequestArguments) (*dap.Capabilities, error)

Initialize implements dap.Handler and should not be called directly.

func (*Adapter) Process

func (a *Adapter) Process(pm dap.IProtocolMessage) error

Process implements dap.Handler and should not be called directly.

func (*Adapter) Terminate

func (a *Adapter) Terminate()

Terminate implements dap.Handler and should not be called directly.

type Options

type Options struct {
	// SrcPath is used for setting breakpoints on '_.go'. If it is non-empty,
	// SrcPath will be replaced with _.go in breakpoint requests and vice versa
	// in stack traces.
	SrcPath string

	// NewInterpreter is called to create the interpreter.
	NewInterpreter func(interp.Options) (*interp.Interpreter, error)

	// If StopAtEntry is set, the debugger will halt on entry.
	StopAtEntry bool

	// Non-fatal errors will be sent to Errors if it is non-nil
	Errors chan<- error
}

Options for Adapter.

Directories

Path Synopsis
cmd
internal
iox
pkg
dap

Jump to

Keyboard shortcuts

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