Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion extension/script/backend/worker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ local coroutineTree = {}
local stackFrame = {}
local skipFrame = 0
local baseL
local continueSkipSource
local continueSkipLine
local stoppedSource
local stoppedLine

local CMD = {}

Expand Down Expand Up @@ -495,6 +499,10 @@ function CMD.stop(pkg)
end

function CMD.run()
if state == 'stopped' and stoppedSource and stoppedLine then
continueSkipSource = stoppedSource
continueSkipLine = stoppedLine
end
state = 'running'
hookmgr.step_cancel()
end
Expand Down Expand Up @@ -594,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',
Expand Down Expand Up @@ -652,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
}
Expand Down
Loading