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

Debug Adapter Protocol Support #66

Open
tbo opened this issue Aug 21, 2018 · 2 comments
Open

Debug Adapter Protocol Support #66

tbo opened this issue Aug 21, 2018 · 2 comments

Comments

@tbo
Copy link

tbo commented Aug 21, 2018

I think support for the Debug Adapter Protocol would be an nice addition to this plugin and extend its usage to more languages. It might even eliminate the necessity to maintain support for most, if not all, wrappers.

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

@idanarye
Copy link
Owner

Not that trivial. DAP seems to be designed for RPC, while Vebugger is designed to handle command line debuggers.

@tbo
Copy link
Author

tbo commented Aug 22, 2018

I think, that a lot of debug adapters interact with command line adapters as well (e.g. https://marketplace.visualstudio.com/items?itemName=webfreak.debug). They just expose the functionality via a high level API. I would expect, that most vebugger write actions can directly be mapped to DAP Requests. I created a (very) high-level mapping of vebugger commands to DAP Requests:

VBGstepOver -> Next
VBGstepIn -> StepIn
VBGstepOut -> StepOut
VBGcontinue -> Continue

VBGtoggleBreakpoint -> SetBreakPoints
VBGtoggleBreakpointThisLine -> SetBreakPoints
VBGclearBreakpoints -> SetBreakPoints

VBGeval -> Evaluate
VBGevalSelectedText -> Evaluate
VBGevalWordUnderCursor -> Evaluate

VBGexecute -> ? (maybe Evaluate)
VBGexecuteSelectedText -> ? (maybe Evaluate)

VBGkill -> Disconnect or Terminate

VBGtoggleTerminalBuffer <- RunInTerminal
VBGrawWrite -> ?
VBGrawWriteSelectedText -> ?

The part, that would likely differ the most is the debugger feedback. I don't know how well DAP's event model would fit into vebugger'a read handler model. There are probably a lot of things, that I'm missing here.
@idanarye Would you say, that it makes sense to implement this in vebugger? I would otherwise checkout a NodeJs based solution, since there already is a complete SDK for it (https://github.com/Microsoft/vscode-debugadapter-node).

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