Race condition for custom response handler?
theHamsta opened this issue · comments
Stephan Seitz commented
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
Stephan Seitz commented