add argv to open the logger window

This commit is contained in:
Jeff Carr 2024-02-16 20:36:02 -06:00
parent 8c873d7ab2
commit b2feffce92
Notes: Jeff Carr 2025-02-14 00:50:44 -06:00
// `autogen:go.mod`

module go.wit.com/lib/debugger

go 1.22

toolchain go1.23.6

require (
	go.wit.com/dev/alexflint/arg v1.5.5
	go.wit.com/gui v0.22.26
	go.wit.com/lib/gadgets v0.22.9
	go.wit.com/lib/gui/logsettings v0.22.9
	go.wit.com/log v0.22.16
	go.wit.com/widget v1.1.29
)

require (
	go.wit.com/dev/alexflint/scalar v1.2.4 // indirect
	go.wit.com/lib/protobuf/guipb v0.0.2 // indirect
	google.golang.org/protobuf v1.36.5 // indirect
)

// `autogen:go.sum`

github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
go.wit.com/dev/alexflint/arg v1.5.5 h1:c4jgIb4OvHjnCMRNSjOa1sNLl6WDxV6tIkMVezR9hCk=
go.wit.com/dev/alexflint/arg v1.5.5/go.mod h1:nH3F6TJDaAUgnLkC0WgRN/H047YfN1TYKaWPYr6B8lo=
go.wit.com/dev/alexflint/scalar v1.2.4 h1:zmBeEkObwz1lcelwfGNYP2GS6SQ9e0tdv7JdHwMZEEk=
go.wit.com/dev/alexflint/scalar v1.2.4/go.mod h1:kCNO1Fo5LnnK6+qa+zYhP5fdgfC1C+vx1ti99Md+FAM=
go.wit.com/gui v0.22.26 h1:HtdV1kx6wHpCTyS67s2KdMCyX6teNXIQOk1NyX6o8bY=
go.wit.com/gui v0.22.26/go.mod h1:6OVZofoS43VNUiQWR0aJkXEcqpuIhERJQnxhdGrEsHo=
go.wit.com/lib/gadgets v0.22.9 h1:NUrPSCWwFMzt5iXNkEIh9tTkWX6f/4jrCoWosmFmKD8=
go.wit.com/lib/gadgets v0.22.9/go.mod h1:Gf3TM674Nu73xKJzWqindIM43IXPzACB/+YH+NMrh+c=
go.wit.com/lib/gui/logsettings v0.22.9 h1:yQM5Vb2iHboBt/M77K06zFJ1tQbCcdkeeUuLmIIN1iU=
go.wit.com/lib/gui/logsettings v0.22.9/go.mod h1:IMy6Sz8+PKaHcPxA0fk3J+c6426m0Wq3Bgw/ntfEa+I=
go.wit.com/lib/protobuf/guipb v0.0.2 h1:ZR4cLy+XheRQEFLlissBmASJDqiLfHaAluF6wYbVuOo=
go.wit.com/lib/protobuf/guipb v0.0.2/go.mod h1:mZsirb7zRgsE2IGHuvHkG7j85hkrGZl3NAALOEkjowA=
go.wit.com/log v0.22.16 h1:E0Vd0Z2ILtfjhs7J/CQ4g13DK1jtQiYl6l5KOBGsZoA=
go.wit.com/log v0.22.16/go.mod h1:/c5Uj30sWRQ4B5ei2ElB6Q8Si/cK6v+KbxnH208KD84=
go.wit.com/widget v1.1.29 h1:rURM/N1hbrl0btGlBIUx0SCre9jj+hshvkBLMMa008I=
go.wit.com/widget v1.1.29/go.mod h1:wj7TpAr2gk7Poa+v8XQkH1aidnTdgAa/a8GxrMtcztw=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=

// `autogen:`
2 changed files with 5 additions and 4 deletions

View File

@ -17,6 +17,7 @@ var argDebugger ArgsDebugger
// This struct can be used with the go-arg package // This struct can be used with the go-arg package
type ArgsDebugger struct { type ArgsDebugger struct {
Debugger bool `arg:"--debugger" help:"open the debugger window"` 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 // returns true if --gui-debug was passed from the command line
@ -24,6 +25,10 @@ func ArgDebug() bool {
return argDebugger.Debugger return argDebugger.Debugger
} }
func ArgLogger() bool {
return argDebugger.Logger
}
func init() { func init() {
arg.Register(&argDebugger) arg.Register(&argDebugger)

View File

@ -26,10 +26,6 @@ func DebugWindow() {
me.bugWin.Make() me.bugWin.Make()
DebugWindow2(me.bugWin.Box(), "Debug Tab") DebugWindow2(me.bugWin.Box(), "Debug Tab")
me.bugWin.Show() me.bugWin.Show()
if ArgDebug() {
// log.SetTmp()
}
} }
func DebugWindow2(newB *gui.Node, title string) *gui.Node { func DebugWindow2(newB *gui.Node, title string) *gui.Node {