From 66694c1a09ff2522e553d37eeb025b183dea551d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 12 Feb 2024 08:27:39 -0600 Subject: make a simple way to enable the debugger Signed-off-by: Jeff Carr --- debugger.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 debugger.go (limited to 'debugger.go') diff --git a/debugger.go b/debugger.go new file mode 100644 index 0000000..116d549 --- /dev/null +++ b/debugger.go @@ -0,0 +1,26 @@ +package main + +/* + enables GUI options and the debugger in your application +*/ + +import ( + "go.wit.com/dev/alexflint/arg" + "go.wit.com/lib/debugger" + "go.wit.com/log" +) + +var args struct { +} + +func init() { + arg.MustParse(&args) + + if debugger.ArgDebug() { + log.Info("cmd line --debugger == true") + go func() { + log.Sleep(2) + debugger.DebugWindow() + }() + } +} -- cgit v1.2.3