nvim-dap
nvim-dap copied to clipboard
Scopes widget (and probably others) doesn’t refresh on session change. No session changed event
Debug adapter definition and debug configuration
No response
Debug adapter version
main branch
Steps to Reproduce
- Setup some autcommands to open scopes and sessions widget
local widgets = require("dap.ui.widgets")
vim.api.nvim_create_user_command("OpenScopes", function()
widgets.sidebar(widgets.scopes).open()
end, {})
vim.api.nvim_create_user_command("OpenSesssions", function()
widgets.cursor_float(widgets.sessions).open()
end, {})
-
Open project to debug, set breakpoint, start new session
-
Open scopes widget and make a few steps over so widget changes its initial state
-
Start new session (:DapNew)
-
This time, scopes widget updates
-
Now change session back using sessions widget (:OpenSessions)
-
This time, scopes widget doesn’t update, and we need to close it and reopen to see the actual scopes for this session
Expected Result
Scopes widget (and others) updates when we set a new active session. When we change the active session, "sessionEvent" fires. (This could be useful in other cases too.)
Actual Result
https://github.com/user-attachments/assets/cb0246bc-6635-435d-a35b-63bfe52cdc7a
The video is a bit messy but I hope you got the gist