-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlighting the current frame does not work #303
Comments
I noticed that for PHP adapter for none of Please look into the example from https://github.com/przepompownia/nvim-dap-ui-current-frame-bug ( I'm not sure if the bug lies on nvim-dap-ui side. |
Fixes rcarriga#303 It's rather a workaround than an ultimate solution, but shows that rcarriga#303 can be fixed on dap-ui side.
Thanks for the fix, I added a few extra changes and pushed to master |
Thank you too. I took a look at how you made the access to frames without direct |
...althoug I get
after exiting if |
Currently in my local env I have diff --git a/lua/dapui/components/frames.lua b/lua/dapui/components/frames.lua
index f15323b..bc42310 100644
--- a/lua/dapui/components/frames.lua
+++ b/lua/dapui/components/frames.lua
@@ -18,6 +18,18 @@ return function(client, send_ready)
local current_frame_id = nil
+ local threads = client.session.threads
+
+ if not threads then
+ vim.notify('No threads for session', vim.log.levels.ERROR, {title = 'DAP UI'})
+ return
+ end
+
+ if not threads[thread_id] then
+ vim.notify('No thread ' .. thread_id, vim.log.levels.ERROR, {title = 'DAP UI'})
+ return
+ end
+
local frames = client.session.threads[thread_id].frames
if not frames then
return
to debug what part of path is nil (and avoid this error in a regular work). |
|
@mikehaertl thanks for pointing out the place. Do you have a working frames view after this change? |
@mikehaertl you have visible frames on the screenshot. The widget hierarchy is DAP Stacks -> threads -> frames (@rcarriga please correct me if I'm wrong). |
Currently I can't see which frame is current.
I found
DapUICurrentFrameName
highlight insideframes.lua
but it doesn't seem to be applied.:Inspect
on the current frame's line showsThe text was updated successfully, but these errors were encountered: