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

How do you actually run the debugger 😅 #60

Open
joshpetit opened this issue Jan 26, 2022 · 3 comments
Open

How do you actually run the debugger 😅 #60

joshpetit opened this issue Jan 26, 2022 · 3 comments

Comments

@joshpetit
Copy link

Hey, thanks for making such an easy to use plugin. I've been able to get everything installed, but don't see any specific documentation on how to run the debugger. Could you let me know how to do that?

@pocco81
Copy link
Owner

pocco81 commented Jan 27, 2022

Check nvim DAP's documentation: https://github.com/mfussenegger/nvim-dap/blob/master/doc/dap.txt

hope it helps :)

@joshpetit
Copy link
Author

Yea I've used nvim-dap's debugger and have run it just fine, I'm just confused on how to use it with dap install, this is how I run my node debugger:

M.node = function()
    print("attaching")
    require('dap').run({
        type = 'node2',
        request = 'attach',
        cwd = vim.fn.getcwd(),
        sourceMaps = true,
        protocol = 'inspector',
        skipFiles = {'<node_internals>/**/*.js'}
    })
    require("dapui").open();
end

Looking at the documentation there seems to be multiple ways to run? How do I run using the built-in nvim-dap configuraiton? If you could point me to the specific place in the documentation that works with dap install I would appreciate it, it would make it easier for people to transition to using dap install as well.

@joshpetit
Copy link
Author

I may be misunderstanding how the configuration works, when I use the default configuration it doesnt work since my flutter sdk and dart sdk paths are different, so I try to configure it like so:

dap_install.config("dart", {
	configurations = {
		{
			dartSdkPath = "/opt/flutter/bin/cache/dart-sdk/",
			flutterSdkPath = "/opt/flutter",
		},
	},
})

I tried with the name "dart" and "dart-code" . I get the error:

Invalid adapter `nil` for config `nil`

For 'dart' and the error:

No configuration found for `dart`. You need to add configs to `dap.configurations.dart` (See `:h dap-configuration`)

for 'dart-code' which makes me think it's not running with the overriden dart defaults. Is there a certain way I'm supposed to run it to work with dap-install? I'm just doing dap.continue() to start the process.

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