summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-13 20:10:45 -0600
committerJeff Carr <[email protected]>2025-02-13 20:10:45 -0600
commit88f6e8519b7f3e735c86b02ceb8fcb6bc9c8078d (patch)
treeeb1669fe82c52593719e74a2fa28082e808ddc20
parentce18af897a6aac7ce9d19af9520ce531cfad31df (diff)
stubbed in tables
-rw-r--r--Makefile5
-rw-r--r--debugger.go20
-rw-r--r--doGui.go5
3 files changed, 28 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c7f385b..409f9d8 100644
--- a/Makefile
+++ b/Makefile
@@ -34,10 +34,11 @@ plugin:
cp ../../toolkits/gocui/gocui.so resources/
andlabs: install
- forge --gui andlabs
+ forge --gui andlabs --debugger
gocui: install
- forge --gui gocui --gui-verbose >/tmp/forge.log 2>&1
+ # forge --gui gocui --gui-verbose >/tmp/forge.log 2>&1
+ forge --gui gocui --gui-verbose --debugger
goimports:
reset
diff --git a/debugger.go b/debugger.go
new file mode 100644
index 0000000..f7a6aca
--- /dev/null
+++ b/debugger.go
@@ -0,0 +1,20 @@
+package main
+
+/*
+ enables GUI options and the debugger in your application
+*/
+
+import (
+ "go.wit.com/lib/debugger"
+ "go.wit.com/log"
+)
+
+func init() {
+ if debugger.ArgDebug() {
+ log.Info("cmd line --debugger == true")
+ go func() {
+ log.Sleep(2)
+ debugger.DebugWindow()
+ }()
+ }
+}
diff --git a/doGui.go b/doGui.go
index b5fd9de..44f7399 100644
--- a/doGui.go
+++ b/doGui.go
@@ -12,6 +12,7 @@ import (
"time"
"go.wit.com/gui"
+ "go.wit.com/lib/debugger"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/shell"
"go.wit.com/log"
@@ -203,4 +204,8 @@ func drawWindow(win *gadgets.BasicWindow) {
grid.NewButton("forge ConfigSave()", func() {
me.forge.ConfigSave()
})
+
+ grid.NewButton("debugger()", func() {
+ debugger.DebugWindow()
+ })
}