Skip to content

Commit c1bfcd8

Browse files
committed
Use first frame with source as top-frame
It doesn't need to have a path. Frames with source reference can be fetched
1 parent 1cedf68 commit c1bfcd8

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lua/dap/protocol.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---@meta
2+
3+
14
---@class dap.ProtocolMessage
25
---@field seq number
36
---@field type "request"|"response"|"event"|string

lua/dap/session.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,10 @@ end
615615

616616

617617
---@param frames dap.StackFrame[]
618+
---@return dap.StackFrame|nil
618619
local function get_top_frame(frames)
619620
for _, frame in pairs(frames) do
620-
if frame.source and frame.source.path then
621+
if frame.source then
621622
return frame
622623
end
623624
end

0 commit comments

Comments
 (0)