debugger

package
v29.0.0-...-a2903dc Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAddress defines the default debug server address.
	DefaultAddress = "127.0.0.1:30500"

	// DefaultWorkingDir defines the default directory to use as
	// working dir when running the app binary that will be debugged.
	DefaultWorkingDir = "."
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, binaryPath string, options ...Option) error

Run runs a debug client.

func Start

func Start(ctx context.Context, binaryPath string, options ...Option) (err error)

Start starts a debug server.

Types

type Option

type Option func(*debuggerOptions)

Option configures debugging.

func Address

func Address(address string) Option

Address sets the address for the debug server.

func BinaryArgs

func BinaryArgs(args ...string) Option

BinaryArgs sets command line argument for the new process.

func ClientRunHook

func ClientRunHook(fn func()) Option

ClientRunHook sets a function to be executed right before debug client is run.

func DisconnectChannel

func DisconnectChannel(c chan struct{}) Option

DisconnectChannel sets the channel used by the server to signal when the client disconnects.

func Listener

func Listener(l net.Listener) Option

Listener sets a custom listener to serve requests.

func ServerStartHook

func ServerStartHook(fn func()) Option

ServerStartHook sets a function to be executed right before debug server starts.

func WorkingDir

func WorkingDir(path string) Option

WorkingDir sets the working directory of the new process.

Jump to

Keyboard shortcuts

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