theHamsta / nvim-dap-virtual-text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Race condition for custom response handler?

theHamsta opened this issue · comments

I observed that the virtual text does not show up reliably since this plugin was factored out of the PR. We rely that our response handler is executed after the handler of nvim-dap. But this doesn't seem to be the always case (except for slow Python debugger debugpy), especially

Placing the following after this line https://github.com/mfussenegger/nvim-dap/blob/20e4bb21dbe4c35965b37687fdaf384a09e9330f/lua/dap.lua#L401

seems to solve the issue (this would guarantee that we are always called after nvim-dap setting the variables.

          for _, c in pairs(M.custom_response_handlers.variables) do
            c(self, nil)
          end

Seems to work with LLDB with this workaround
image