Comments (6)
I think the point is rather that the spec doesn't say that the string that's reported via value
is also what's going to be passed to setVariable
when user edits it in the IDE. True, the IDE is not really interpreting that string. But it's passing it from one place to another, and since it crosses the protocol boundary twice in doing so, it needs to be a part of the contract.
It's always going to be best effort, of course, because not all values have a representation that's suitable for re-evaluation. But if DAP implementations are failing to do so for something as basic as string literals, clearly it needs some nudging from the spec side.
from debug-adapter-protocol.
DAP only deals with strings rendered in the UI. The DAP does not define any "primitive types" for data (variables).
The strings are shown as is.
There is no interpretation, evaluation, quoting or escaping performed in the frontend.
This gives the DA full control over what is shown to the user, but it is an obligation too: the DA has to format the value as the user would expected them to look like in the specific language.
The "value" argument in the SetVariableArguments is again just a string that is not interpreted by the frontend in any way. It is the DAs responsibility to interpret it in a way that makes sense for the given language/debugger.
The frontend does not assume anywhere that a "foo" is a string, 123 a number, and null a special value. The values are received from the DA as ""foo"" and "123" and "null".
from debug-adapter-protocol.
This issue has been closed because it represents a question. Questions are better addressed on StackOverflow.
Happy Coding!
from debug-adapter-protocol.
@weinand : That is not an acceptable response. I asked that the specification be clarified. I would expect either a pointer to the part of the specification or accompanying documents where this is already explained, meaning I did not read them properly, -- or a rationale for why this does not need explaining.
from debug-adapter-protocol.
Sorry the bot closed this issue.
I properly tagged it as a "Clarification" request.
from debug-adapter-protocol.
One minor note: someday we might want to extend the debug adapter protocol to add a new format
or context
that a client can use to obtain the 'editable value' of an expression/variable. VS has this concept within our internal debugging APIs so that backends can provide one value in the normal display scenario, but then a different value when the user double clicks to edit.
from debug-adapter-protocol.
Related Issues (20)
- 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
- > Alternatively, a statement that “typically the return value from the last function call should be reported as a Scope named ‘return’” might help with consistency for users.
- Public changelog has no date stamps HOT 1
- [Question][Feature request] is it able to integrate to monaco editor? HOT 5
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.