2024-01-03 11:18:56 -06:00
|
|
|
package debugger
|
|
|
|
|
|
|
|
// initializes logging and command line options
|
|
|
|
|
|
|
|
import (
|
2024-01-07 19:24:45 -06:00
|
|
|
"go.wit.com/arg"
|
2024-01-03 22:10:13 -06:00
|
|
|
"go.wit.com/log"
|
2024-01-03 11:18:56 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
var INFO log.LogFlag
|
|
|
|
var POLL log.LogFlag
|
|
|
|
var BUG log.LogFlag
|
|
|
|
var argDebugger ArgsDebugger
|
|
|
|
|
|
|
|
// This struct can be used with the go-arg package
|
|
|
|
type ArgsDebugger struct {
|
|
|
|
Debugger bool `arg:"--debugger" help:"open the debugger window"`
|
|
|
|
}
|
|
|
|
|
2024-01-03 13:25:47 -06:00
|
|
|
// returns true if --gui-debug was passed from the command line
|
|
|
|
func ArgDebug() bool {
|
|
|
|
return argDebugger.Debugger
|
|
|
|
}
|
|
|
|
|
2024-01-03 11:18:56 -06:00
|
|
|
func init() {
|
|
|
|
arg.Register(&argDebugger)
|
|
|
|
|
|
|
|
INFO.B = false
|
|
|
|
INFO.Name = "INFO"
|
|
|
|
INFO.Subsystem = "bugger"
|
|
|
|
INFO.Desc = "simple debugging Info()"
|
|
|
|
INFO.Register()
|
|
|
|
|
|
|
|
POLL.B = false
|
|
|
|
POLL.Name = "POLL"
|
|
|
|
POLL.Subsystem = "bugger"
|
|
|
|
POLL.Desc = "watch the debugger poll things"
|
|
|
|
POLL.Register()
|
|
|
|
}
|