From b160c92e2f97c83e70e75b849293ffa1a5ffd2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 27 Apr 2026 21:27:20 +0800 Subject: [PATCH 1/2] Fix stale breakpoint hit after continue --- extension/script/backend/worker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/script/backend/worker.lua b/extension/script/backend/worker.lua index bd8d6ba3..d99e178f 100644 --- a/extension/script/backend/worker.lua +++ b/extension/script/backend/worker.lua @@ -496,6 +496,7 @@ end function CMD.run() state = 'running' + hookmgr.break_closeline() hookmgr.step_cancel() end From 168569f759f39051cd9821825c81f5b354f20ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 27 Apr 2026 21:34:01 +0800 Subject: [PATCH 2/2] Fix continue breakpoint skip logic without disabling line hooks --- extension/script/backend/worker.lua | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/extension/script/backend/worker.lua b/extension/script/backend/worker.lua index d99e178f..bf22e790 100644 --- a/extension/script/backend/worker.lua +++ b/extension/script/backend/worker.lua @@ -30,6 +30,10 @@ local coroutineTree = {} local stackFrame = {} local skipFrame = 0 local baseL +local continueSkipSource +local continueSkipLine +local stoppedSource +local stoppedLine local CMD = {} @@ -495,8 +499,11 @@ function CMD.stop(pkg) end function CMD.run() + if state == 'stopped' and stoppedSource and stoppedLine then + continueSkipSource = stoppedSource + continueSkipLine = stoppedLine + end state = 'running' - hookmgr.break_closeline() hookmgr.step_cancel() end @@ -595,8 +602,20 @@ local function event_breakpoint(src, line) hookmgr.break_closeline() return end - local bp = breakpoint.hit_bp(src, source.line(src, line)) + local currentline = source.line(src, line) + if continueSkipSource ~= nil then + if continueSkipSource == src and continueSkipLine == currentline then + continueSkipSource = nil + continueSkipLine = nil + return + end + continueSkipSource = nil + continueSkipLine = nil + end + local bp = breakpoint.hit_bp(src, currentline) if bp then + stoppedSource = src + stoppedLine = currentline state = 'stopped' runLoop { reason = 'breakpoint', @@ -653,6 +672,8 @@ function event.step(line) hookmgr.step_cancel() end if state == 'stopped' then + stoppedSource = src + stoppedLine = source.line(src, line) runLoop { reason = stopReason }