Documentation ¶
Overview ¶
Package debug provides a very simple function that, if executed will replace the executable with dlv running the executable and listening on the port specified by an environment variable.
Example: if err := debug.Self(); err != nil { fmt.Println(err) }
Index ¶
Constants ¶
View Source
const ( // Dlv - name of Dlv executable, also used as default prefix to env variable, ie, DLV_ Dlv = "dlv" // Listen - string used as default second part of env variable, ie, _PORT in DLV_PORT Listen = "listen" )
Variables ¶
This section is empty.
Functions ¶
func Self ¶
Self - replaces executable with dlv running the executable and listening on a port
envVariableParts - variadic list of 'pieces' to be transformed into the env variable indicating where dlv should listen. Default: If no envVariableParts are provided, env variable defaults to []string{Dlv,Listen,path.Base(os.Args[0])} which is DLV_PORT_<name of executable>
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.