From fa79004ab987b349f3912f3e89facad16951a91a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 18 Oct 2025 05:09:56 -0500 Subject: work on this here --- debugger.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 debugger.go diff --git a/debugger.go b/debugger.go new file mode 100644 index 0000000..d732a36 --- /dev/null +++ b/debugger.go @@ -0,0 +1,44 @@ +package argvpb + +// initializes logging and command line options + +/* +import ( + "go.wit.com/dev/alexflint/arg" + "go.wit.com/log" +) + +var INFO *log.LogFlag +var POLL *log.LogFlag +var CHAN *log.LogFlag +var WARN *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"` + Logger bool `arg:"--logger" help:"open the log.* control window"` +} + +// returns true if --gui-debug was passed from the command line +func ArgDebug() bool { + return argDebugger.Debugger +} + +func ArgLogger() bool { + return argDebugger.Logger +} + +func Debugger() { + arg.Register(&argDebugger) + + full := "go.wit.com/bug/debugger" + short := "bugger" + + INFO = log.NewFlag("INFO", false, full, short, "simple debugging Info()") + POLL = log.NewFlag("POLL", false, full, short, "watch the debugger poll things") + CHAN = log.NewFlag("CHAN", true, full, short, "chan() test code output") + WARN = log.NewFlag("WARN", true, full, short, "should warn the user") +} +*/ -- cgit v1.2.3