zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.93k stars 2.82k forks source link

Microsoft Debug Adapter Protocol support #5307

Open aexvir opened 2 years ago

aexvir commented 2 years ago

this might be too early to suggest but is one of the features that makes a simple editor become an essential tool for my workflow \ I simply love integrated development environments

you're probably already aware of this, but for those (few) reading this that might not know about this, similar to how lsp provides code intelligence, the folks at microsoft also defined a protocol for letting any tool act as a debugger, which is also what vscode relies in for it's debugging feature; that protocol is the debug adapter protocol, and it's specification can be read on the dap project site

https://microsoft.github.io/debug-adapter-protocol/specification

the biggest advantage of implementing dap support instead of doing it from scratch obviously comes from the fact that vscode already uses it and many language servers implement it as well; so we'd be getting all the debugging features provided by the official development teams and/or the community

is this something that you see zed supporting at some point? or would you rather defer this to some future plugin framework?

thraizz commented 1 year ago

An implementation example can be found looking at the nvim ecosystem, where nvim-dap provides a great example of how debugging can work.

I was really happy to hear Nathan mention it in the changelog podcast at the end of the interview episode, excited about the time when this will be included, and I can get my team members to try zed!

Anthony-Eid commented 7 months ago

Is there anyone that would like to pair up and work on this feature together?

RemcoSmitsDev commented 6 months ago

Is there anyone that would like to pair up and work on this feature together?

If you are still down to work on it, let's do it!

davidbuzz commented 5 months ago

a rust implemention of dap aparently exists here: https://github.com/sztomi/dap-rs

notpeter commented 3 months ago

For reference, microsoft has a complete JSON schema defined here: debugAdapterProtocol.json.

I have previously used oxidecomputer/typify to generate Rust types from that schema with some success, might be worth considering.

RemcoSmitsDev commented 3 months ago

@notpeter Thanks for the tip! Didn't know about that one. Got already most of the types in, but it's handy for in the future if I ever have to map a lot of data!

RemcoSmitsDev commented 3 months ago

For the people that really miss this feature inside Zed, here is a sneak peek about what you already can do πŸ‘€πŸ‘€

https://github.com/zed-industries/zed/assets/62463826/69eab768-7594-4edf-b383-b935e7660d49

Basics: