diff options
| author | Jeff Carr <[email protected]> | 2025-10-18 05:09:56 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-18 05:09:56 -0500 |
| commit | fa79004ab987b349f3912f3e89facad16951a91a (patch) | |
| tree | 8d7f240c2cf27fd049185be659f21e75e96cd2e8 | |
| parent | ddd8f9a75fe6c85c2703b501b73d567b58ffcb10 (diff) | |
work on this here
| -rw-r--r-- | debugger.go | 44 |
1 files changed, 44 insertions, 0 deletions
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") +} +*/ |
