-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add additional data fields for breakpoints #445
Comments
I strongly oppose. Same reasons as usual. This is just an out of band inner-platform-effect protocol shoehorned into a well defined one. The correct approach is to define the full set of supported things in protocol, IMO. If we need more types of breakpoint with more properties, let's specify them and add them with well defined semantics. |
@puremourning worded it accurately. Such a generic The interest of improving embedded development in DAP and DAP-supporting clients is very welcome! However, it is usually more useful to start discussions from the perspective of, "what user actions or capabilities do we need to support that DAP can't currently?" Then from there we can determine the right enhancements to make to the protocol.
I am not opposed to a breakpointType property, but we need a better definition of what it is, why it is, and how it would work. |
Thank you for your prompt and insightful feedback! I understand your concerns about straying from a well-defined protocol. Our goal is certainly not to undermine the protocol's integrity or hinder the development of entirely generic debug clients. Therefore, I want to clarify our reasoning behind the proposal:
Anyway, I certainly understand your concerns, but would be very interested to get your feedback and insights after my attempt to clarify our goals above. An alternative, as you suggested, would be to define additional breakpoint types, which list a number of optional properties. Whether or not those properties are then applicable in a concrete debug session for a specific hardware would then have to be enumerated in the capabilities' flags. I'd expect this to work for a good part of the use cases, even though it'd probably limit the flexibility across different device families and vendors. I'm sure others linked in the original proposal can give a more accurate judgement on that. Thanks again for your speedy feedback! |
Do you have some concrete examples? I also don't really understand how this relates to microsoft/vscode#152428 or microsoft/vscode#181794 - these are afaik both things a client could already implement, if they wanted to, using the functionality part of the existing protocol specification. |
Thanks for the detailed feedback. We do have precedent for some level of adapter-defined extensibility in, for example, the I do not want an 'unbounded' configuration scheme. Aside from theological concerns, building a UI that can express any JSON schema (and isn't just a JSON editor) is a huge undertaking for clients. VS Code's configuration editor that you reference is years old and still only handles relatively basic cases of JSON schema. I'd be helpful to gather more information about the scenarios you're after, and where for example an adapter-enumerated list of 'breakpoint types' would not cover. I understand that there are an unbounded number of vendors with different hardware and configurations, but I'm sure there are some common cases that can cover the majority of uses :) |
@mfussenegger Thanks for you feedback!
I mentioned those issues, as they would benefit from allowing users to specify additional data for breakpoints (e.g. dependent breakpoints, associated cores). |
@connor4312 Thank you very much for your constructive feedback! It certainly is a good idea to layout concrete examples and provide starting from the user perspective and work our way down to the protocol. I'll make sure to collect a few representative use cases and get back to you in the next few days. Thanks again! |
Hi all, As part of the CDT cloud - hardware breakpoint discussion we created a few slides to show the kind of control that is needed and why. Please see the attached slides from a Renesas point of view, if you have some questions, please let me know. Best regards, |
Thanks, Mark. Here are the things I see from the slide that are currently not possible in DAP:
|
I've opened a pair of proposals (linked above) to start tackling these requests. Trying to avoid having 'unbounded' behavior, these both add additional well-defined capabilities and type to the protocol. Please weigh in! |
Another extension would be function breakpoint sources. Multiple functions with identical names from different files can exist in most, if not all, languages. Specifying the source of the function to break on distinguishes them. gdb does this with the syntax Visual Studio with I don't know how other debuggers handle this. |
I've made a couple changes and additions here. Please, if there are more features you'd like in particular from DAP, open new issues for them so we can track them individually. Thanks! |
The Debug Adapter Protocol (DAP) defines a rigid payload schema for breakpoints, without offering a standardized mechanism for transferring custom breakpoint data. This hampers implementing important features, such as breakpoint types (e.g., hardware/software breakpoints), multicore and multi thread features. Previously, more narrow-focused proposals didn't gain enough traction, so a general approach to custom breakpoint data could serve everyone better.
microsoft/vscode#152428
microsoft/vscode#181794
microsoft/vscode#187854
Proposal
We propose to add a new property named customData into the payload of the set breakpoint request and response (SourceBreakpoint type and Breakpoint type). The customData property should be of type
any
to support transferring arbitrary information.To enable a generic editing UI in the development tool, we propose to add a supportedBreakpointData capability flag in the initialize request (client to adapter). In the Capabilities type, the adapter can then define in its response the supported custom breakpoint data properties using a format similar to the configuration property schema in VS Code. Based on this schema, the development tool can show a configuration widget on the breakpoint that allows the user to specify the supported breakpoint settings.
Additionally, we propose to introduce an explicit breakpointType property on SourceBreakpoint type and Breakpoint type and let the debug adapter specify which types it supports in the Capabilities response. The property schema for breakpoint data mentioned above could then be grouped by breakpoint type, so the development tool could offer a UI for the user to switch between supported breakpoint types and show the correct configuration widget depending on the selected breakpoint type. This could further be harmonized with the UI for switching between, e.g. conditional breakpoints and source breakpoints.
Context
This proposal originated from an ongoing initiative to improve embedded development in modern IDEs, such as VS Code and Eclipse Theia, in the CDT Cloud community, in particular
We are looking forward to your feedback and would happily support the implementation of this proposal.
The text was updated successfully, but these errors were encountered: