Comments (8)
There's no "disabled" state in DAP. In VS Code, a disabled breakpoint is simply not sent to the debugger.
from debug-adapter-protocol.
There's no "disabled" state in DAP. In VS Code, a disabled breakpoint is simply not sent to the debugger.
it is OK from editor to debugger. what about from debugger to editor?
if I disabled breakpoints through debug console, the breakpoint's status would be inconsistent.
In debugger side, the breakpoint is disabled, but in VS Code side, the breakpoint is still enabled.
The breakpoint changed event seems not work for this, because of no "disabled" state in breakpoint response.
from debug-adapter-protocol.
That's correct, the debug adapter does not control the breakpoint enablement state. If it fails to set a breakpoint, it can signal that by marking it as unverified with a message. But the adapter is driven by the client, not the other way around.
Is there a use case you have in mind where having the DA disable a breakpoint would be useful?
from debug-adapter-protocol.
As I know the unverified status is for pending.
I think it's a common case(or debug workflow) for users who like use debug console.
Could this be improved in future dap version?
1 Add "disabled" field or
2 Reuse "reason" field ?
from debug-adapter-protocol.
That sounds like something that clients should implement in their "debug console"s rather than in DAP.
from debug-adapter-protocol.
when I input CMD in debug console, it's a "evaluate" REQ, I think the client don't understand these CMD.
Current breakpoint definition of DAP can't tell or distinguish the disable of breakpoint , the client receives the change event, but don't know the reason which is breakpoint disable.
from debug-adapter-protocol.
That is up to the client. There's no requirement in the protocol that a debug console exists or how it should behave.
There is no notion of disabled breakpoints in DAP. And I would not implement it the way you describe e.g. in VS Code, because it would not play nice if there were multiple concurrent debug sessions happening at the same time: a UI breakpoint is not owned by a debug adapter.
It sounds like the way to do what you want would just be to set verified: false
with some message like "Disabled by the user" or something along those lines.
from debug-adapter-protocol.
It sounds like the way to do what you want would just be to set
verified: false
with some message like "Disabled by the user" or something along those lines.
Yes, something like this. Currently, just set "verified: false" the checkbox is still checked in VS code UI.
The "verified" field is set just according to breakpoint pending status for several gdb adapter .
If the "message" or "reason" field are not defined formally, how different dap clients to parse the meaning of message ?
/**
- A message about the state of the breakpoint.
- This is shown to the user and can be used to explain why a breakpoint could
- not be verified.
*/
message?: string;
/**
- A machine-readable explanation of why a breakpoint may not be verified. If
- a breakpoint is verified or a specific reason is not known, the adapter
- should omit this property. Possible values include:
-
pending
: Indicates a breakpoint might be verified in the future, but
- the adapter cannot verify it in the current state.
-
failed
: Indicates a breakpoint was not able to be verified, and the
- adapter does not believe it can be verified without intervention.
- Values: 'pending', 'failed'
*/
reason?: 'pending' | 'failed';
from debug-adapter-protocol.
Related Issues (20)
- Extend `StackFrame` to support longer description than `name` HOT 2
- Does `setBreakpoints` trigger multiple `breakpoint` events? HOT 2
- 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 6
- OutputEvent variablesReference lifetime clarification HOT 1
- Proposal: add a document location to the evaluate request for the 'hover' variant. HOT 16
- Help needed : Disassembly a C/C++ frame (function) 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.