dbg

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

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

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 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