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

[Feature Request] provide abstractions to allow alternative debugger hookups to use termdebug UX #11605

Open
jinyius opened this issue Nov 24, 2022 · 6 comments

Comments

@jinyius
Copy link

jinyius commented Nov 24, 2022

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
termdebug supports GDB/MI only. DAP exists.

Describe the solution you'd like
It would be great if the UX around termdebug could be reused for an ambitious plugin writer to support working with DAP debuggers.

Describe alternatives you've considered
vimspector and neovim's nvim-dap

Additional context
nope

@puremourning
Copy link
Contributor

Describe alternatives you've considered
vimspector and neovim's nvim-dap

Do they not count as "ambitious" enough ?

@razamatan
Copy link

razamatan commented Nov 24, 2022 via email

@brammool
Copy link
Contributor

From the front page DAP looks like a good idea to support. Perhaps start with one debugger that supports it and try make it work with TermDebug? Then plan to expand to support more. I have no idea how much work this would be. I can see a protocol specification, but it doesn't say how the communication is implemented. Using JSON?
It does appear to be very MS-Windows specific, character units are UTF-16 (worst choice ever).

@puremourning
Copy link
Contributor

I can see a protocol specification, but it doesn't say how the communication is implemented. Using JSON?

It uses something like JSON-RPC over stdio. https://microsoft.github.io/debug-adapter-protocol/overview#base-protocol
basically a length header followed by a json payload.

I have no idea how much work this would be.

It's not a small amount of work, in and of itself, but the ecosystem of debug adapters and foibles is a lot of ongoing maintenance. I have been working on vimspector https://github.com/puremourning/vimspector/ for 5 years now and it implements about, say 40% of the spec. Implementing disassembly was weeks of work (elapsed, spare time) on its own.

it's also worth noting there are a number of other DAP plugins for vim that are very good.

@razamatan
Copy link

razamatan commented Nov 27, 2022 via email

@kohnish
Copy link

kohnish commented Jun 27, 2023

GDB has DAP support now. I'm curious if we can try to give an optional support from termdebug already.

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

No branches or pull requests

6 participants