Skip to content
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

dapui does not open when debugging individual test #67

Open
JonPichel opened this issue Jan 25, 2024 · 2 comments
Open

dapui does not open when debugging individual test #67

JonPichel opened this issue Jan 25, 2024 · 2 comments

Comments

@JonPichel
Copy link

Hi,

When I try to debug an individual test with :lua require('dap-go').debug_test(), the dapui interface does not open. Should I hook dapui.open to some other event?

This is my configuration:

return {
	{
		"mfussenegger/nvim-dap",
    dependencies = {
      "rcarriga/nvim-dap-ui",
      "leoluz/nvim-dap-go",
      "mfussenegger/nvim-dap-python",
    },
		config = function()
      require("dapui").setup()
      require("dap-go").setup()

      require("dap-python").setup("~/.local/share/nvim/mason/packages/debugpy/venv/bin/python")

			local dap = require("dap")
      local dapui = require("dapui")

      dap.listeners.before.attach.dapui_config = function()
        dapui.open()
      end
      dap.listeners.before.launch.dapui_config = function()
        dapui.open()
      end
      dap.listeners.before.event_terminated.dapui_config = function()
        dapui.close()
      end
      dap.listeners.before.event_exited.dapui_config = function()
        dapui.close()
      end

			vim.keymap.set("n", "<Leader>dt", dap.toggle_breakpoint, {})
			vim.keymap.set("n", "<Leader>dc", dap.continue, {})
			vim.keymap.set("n", "<Leader>dx", dap.terminate, {})
			vim.keymap.set("n", "<Leader>do", dap.step_over, {})
		end,
	},
}

NVIM version v0.9.5

Copy link

stale bot commented Jul 25, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 25, 2024
@leoluz leoluz removed the wontfix This will not be worked on label Jul 27, 2024
@leoluz
Copy link
Owner

leoluz commented Jul 27, 2024

@JonPichel debug test will invoke dap.run(config) which should trigger the dap.listeners.before.launch event I think. Unfortunately I don't use dapui much and don't know how to configure it exactly. Maybe try without the dapui_config namespace (just with dap.listeners.before.launch)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants