Comments (5)
I believe this would be a very desirable enhancement. It does not seem very logical to allow a different set of breakpoint types to be created from the frontend than those whose creation can be sent as an event from the adapter.
from debug-adapter-protocol.
the response to setFunctionBreakpoints is an array of Breakpoints, not an array of "function breakpoints". i.e. the server always tells the client explicit source/ine for the "resolved" breakpoints.
I think the point is that the DA resolves the function bp into a line bp as that's what it will actually break on (typically?), no? and the client can then render a marker on the source line where the 'Function' breakpoint resolved to.
from debug-adapter-protocol.
How the debugger or the adapter resolves a breakpoint is entirely an internal matter, and it's certainly not the case that every breakpoint will always be resolved to a source breakpoint. For one thing, it's possible to debug a binary for which no source information is available. And if symbol information is available but not source information, then it might be possible to set a breakpoint that can be resolved as an instruction breakpoint but can't be resolved as a source breakpoint at all. If everything could really be reduced to a source breakpoint, then there wouldn't be any point in adding the other breakpoint varieties to the protocol at all - we could just always expect users to find the right place in source to put one. More realistically, all breakpoints boil down to instruction breakpoints, but we certainly wouldn't want to make users input them as such, and we wouldn't want to present them as such, either.
Beyond the theoretical issue, there's also an issue of presentation. Suppose a function breakpoint is added by a user in the debugger directly (by typing in a GDB terminal, say). Since function breakpoints are supported by GDB natively, the user would expect to see a function breakpoint in the UI, but the current protocol forces the adapter to transform it in the breakpoint event, creating a mismatch on a quite practical level, even if the source can be resolved.
from debug-adapter-protocol.
Sure, my point was that the response to setFunctionBreakpoints may need to change, in the sense that it might be a simpler API change to add metadata to the Breakpoint object.
from debug-adapter-protocol.
Yes, I agree with that. I think it's odd that the breakpoint variants don't extend a core Breakpoint interface, but are just declared separately - it's backed the protocol into a corner on this point, a bit.
from debug-adapter-protocol.
Related Issues (20)
- Protocol extension points HOT 3
- Lifetime of variableReference after setVariable HOT 3
- Clarify meaning of "system process" HOT 7
- Example on how to launch debug adapter HOT 3
- Standardise the ability for client/DA to use URIs in place of file paths (enabling debugging of non-file:/ sources) HOT 17
- Add additional data fields for breakpoints HOT 11
- Evaluation time out HOT 1
- Clarifications for setExceptionBreakpoints HOT 6
- Ordering of launch, setBreakpoints, and configurationDone HOT 3
- Add a "type" field for SourceBreakpoints HOT 16
- Add a `bytes` range to the DataBreakpointInfo Request HOT 14
- Clarification of the meaning of '?' in a request HOT 1
- Is it always allowed to send requests that control execution? HOT 3
- Proposal: Add new reason `finished` or `stepOut` and optional field `returnValue` to `Stopped Event` HOT 21
- OutputEvent variablesReference lifetime clarification HOT 1
- How does the debugger notify dap client that a breakpoint is disabled? HOT 8
- Proposal: add a document location to the evaluate request for the 'hover' variant. HOT 18
- Help needed : Disassembly a C/C++ frame (function) HOT 2
- Minor inconsistency in "evaluate" description
- Debug Event which is responsible for loading source file in Editor HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from debug-adapter-protocol.