Skip to content

Commit 6a12fe5

Browse files
committed
Change continue() to resume other session if focused session is not stopped
If you have multiple sessions `continue()` should resume an unfocused session instead of telling the user that the current session is not stopped at a breakpoint.
1 parent 0e889b8 commit 6a12fe5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lua/dap.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,11 @@ function M.continue(opts)
10271027
elseif session.stopped_thread_id then
10281028
session:_step('continue')
10291029
else
1030+
local other_stopped_session = first_stopped_session()
1031+
if other_stopped_session and other_stopped_session.stopped_thread_id then
1032+
other_stopped_session:_step('continue')
1033+
return
1034+
end
10301035
local stopped_threads = vim.tbl_filter(function(t) return t.stopped end, session.threads)
10311036
local prompt
10321037
if not session.initialized then

0 commit comments

Comments
 (0)