Skip to content

Commit

Permalink
Change continue() to resume other session if focused session is not s…
Browse files Browse the repository at this point in the history
…topped

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.
  • Loading branch information
mfussenegger committed Aug 9, 2024
1 parent 0e889b8 commit 6a12fe5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/dap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,11 @@ function M.continue(opts)
elseif session.stopped_thread_id then
session:_step('continue')
else
local other_stopped_session = first_stopped_session()
if other_stopped_session and other_stopped_session.stopped_thread_id then
other_stopped_session:_step('continue')
return
end
local stopped_threads = vim.tbl_filter(function(t) return t.stopped end, session.threads)
local prompt
if not session.initialized then
Expand Down

0 comments on commit 6a12fe5

Please sign in to comment.