-
Notifications
You must be signed in to change notification settings - Fork 138
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
Support execution of debugger commands #231
Comments
also vaguely related: #45 |
Today DAs implement that feature on their own by introducing some "escape" syntax for debugger commands so that they can be distinguished from REPL commands. IMO this approach makes sense because the DA knows best how to integrate debugger commands into the REPL syntax. |
A somewhat related request: #216 Proposal: add a request for standard input Reading program input would be a third component that is interested in reading user input from the debug console (see |
This is the same discussion we had years ago in #45. Terminal emulators and CLI debuggers speak ANSI escape codes and the DAP console does not. If you don't understand the implications of this please read this series of blog posts from Rich Turner. Rich clearly explains why a few teams at Microsoft went to extraordinary lengths to support this for the windows console. But at any length, you've now had the developers of numerous lldb related DAP extensions and DA host implementations request this feature independently. I think that merits further consideration of the idea. |
My request is motivated by a certain amount of impedance mismatch when commands and expressions are multiplexed into debug console:
|
@lanza I think I understand "ANSI escape codes" and the implications of not having them. VS Code's integrated terminal has full support for ANSI escape codes (and much more) and there is rich extension API to talk to the integrated terminal. We have no plans to duplicate any functionality available for the integrated terminal in the debug console. What I do not yet see is how VS Code's generic debugger UI could "wrap" the integrated terminal and connect it via new Debug Adapter Protocol with a command interpreter running in the DA. Do we really need a new abstraction for this or could a debugger extension just use the existing integrated terminal API directly? Before we add new protocol for this area, we should really have a sample extension implementation that shows how a useful client UI would look like and how a generic client implementation would profit from some new standardised DAP protocol. In #216 (comment) we agreed why it doesn't make sense to add new DAP protocol for handling program input. IMO the same arguments apply to new DAP protocol for executing debugger commands. |
@vadimcn what is your proposal for new Debug Adapter Protocol? |
This came up a year or two ago. My position then was against having a standard escape sequence or format that commands should come in, as for example a list debugger might like to use
Clients complete this through the DAP However, as Andre said, in this issue I'm still not clear on the requested UI for this feature. Is distinguishing what's a "debugger command" in the completions list sufficient? |
As pointed out by @lanza and @connor4312 there was already a related discussion in 2019. |
I agree that the DA is in a better position to handle this in general, maybe except for the syntax highlighting. But that is only based on the language of the active editor anyway, so it's always a guess that may not be accurate. |
Thanks everybody for input. Since no sample debugger command UI is available (or has been proposed), I don't think that we are in a position to propose a DAP extension for "execution of debugger commands". I will close this item for now and I suggest that we first try to address some of the identified pain points or limitations:
|
Most gdb/lldb-bsed debug adapters provide a way to execute debugger commands from Debug Console, usually by introducing some prefix to disambiguate commands and expressions. Would be nice if there was an explicit support for this in DA (and, eventually, explicit UI in DAP clients).
Somewhat related to #84, which would be nice to have too.
The text was updated successfully, but these errors were encountered: