Documentation ¶
Index ¶
- func Break(conditions ...bool)
- func Disable()
- func Enable()
- type Watchpoint
- func (w Watchpoint) Break(conditions ...bool)
- func (w *Watchpoint) CallerOffset(offset int) *Watchpoint
- func (w *Watchpoint) Display(nameValuePairs ...interface{}) *Watchpoint
- func (w *Watchpoint) Dump(a ...interface{}) *Watchpoint
- func (w *Watchpoint) Dumpf(format string, a ...interface{}) *Watchpoint
- func (w *Watchpoint) Printf(format string, params ...interface{}) *Watchpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Watchpoint ¶
type Watchpoint struct {
// contains filtered or unexported fields
}
watchpoint is a helper to provide a fluent style api. This allows for statements like hopwatch.Display("var",value).Break()
func CallerOffset ¶
func CallerOffset(offset int) *Watchpoint
CallerOffset (default=2) allows you to change the file indicator in hopwatch. Use this method when you wrap the .CallerOffset(..).Display(..).Break() in your own function.
func Display ¶
func Display(nameValuePairs ...interface{}) *Watchpoint
Display sends variable name,value pairs to the debugger. The parameter nameValuePairs must be even sized.
func Dump ¶
func Dump(a ...interface{}) *Watchpoint
Dump displays the passed parameters with newlines and additional debug information such as complete types and all pointer addresses used to indirect to the final value. Delegates to spew.Fdump, see http://godoc.org/github.com/davecgh/go-spew/spew#Dump
func Dumpf ¶
func Dumpf(format string, a ...interface{}) *Watchpoint
Dumpf formats and displays the passed parameters with newlines and additional debug information such as complete types and all pointer addresses used to indirect to the final value. delegates to spew.Fprintf, see http://godoc.org/github.com/davecgh/go-spew/spew#Dump
func Printf ¶
func Printf(format string, params ...interface{}) *Watchpoint
Printf formats according to a format specifier and writes to the debugger screen. It returns a new Watchpoint to send more or break.
func (Watchpoint) Break ¶
func (w Watchpoint) Break(conditions ...bool)
Break halts the execution of the program and waits for an instruction from the debugger (e.g. Resume). Break is only effective if all (if any) conditions are true. The program will resume otherwise.
func (*Watchpoint) CallerOffset ¶
func (w *Watchpoint) CallerOffset(offset int) *Watchpoint
CallerOffset (default=2) allows you to change the file indicator in hopwatch.
func (*Watchpoint) Display ¶
func (w *Watchpoint) Display(nameValuePairs ...interface{}) *Watchpoint
Display sends variable name,value pairs to the debugger. Values are formatted using %#v. The parameter nameValuePairs must be even sized.
func (*Watchpoint) Dump ¶
func (w *Watchpoint) Dump(a ...interface{}) *Watchpoint
Dump displays the passed parameters with newlines and additional debug information such as complete types and all pointer addresses used to indirect to the final value. Delegates to spew.Fdump, see http://godoc.org/github.com/davecgh/go-spew/spew#Dump
func (*Watchpoint) Dumpf ¶
func (w *Watchpoint) Dumpf(format string, a ...interface{}) *Watchpoint
Dumpf formats and displays the passed parameters with newlines and additional debug information such as complete types and all pointer addresses used to indirect to the final value. Delegates to spew.Fprintf, see http://godoc.org/github.com/davecgh/go-spew/spew#Dump
func (*Watchpoint) Printf ¶
func (w *Watchpoint) Printf(format string, params ...interface{}) *Watchpoint
Printf formats according to a format specifier and writes to the debugger screen.