From 8a05e23f9a6303bd13eef8bb3ed2c90372ecc63e Mon Sep 17 00:00:00 2001 From: "Randall C. O'Reilly" Date: Wed, 28 Aug 2024 10:23:23 -0700 Subject: [PATCH] actually start the debugger for debug attach --- code/debugpanel.go | 3 +++ code/views.go | 1 + 2 files changed, 4 insertions(+) diff --git a/code/debugpanel.go b/code/debugpanel.go index 70f77e8e..d6c6653b 100644 --- a/code/debugpanel.go +++ b/code/debugpanel.go @@ -448,6 +448,9 @@ func (dv *DebugPanel) Stop() { //types:add // if !dv.DbgIsActive() || dv.DbgIsAvail() { // return // } + if dv.Dbg == nil { + return + } _, err := dv.Dbg.Stop() if err != nil { return diff --git a/code/views.go b/code/views.go index 754f018d..4c5ae593 100644 --- a/code/views.go +++ b/code/views.go @@ -190,6 +190,7 @@ func (cv *Code) DebugAttach(pid uint64) { //types:add dv.Config(cv, fileinfo.Go, exePath) cv.FocusOnPanel(TabsIndex) dv.Update() + dv.Start() cv.CurDbg = dv }