microsoft / microsoft/debug-adapter-protocol
support more flexible ValueFormat
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 173
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 2
Description
Variables and Evaluate requests support an optional format field if the debug adapter can supportValueFormattingOptions. But the only option ValueFormat currently available is whether it's hex or not.
interface ValueFormat {
/**
* Display the value in hex.
*/
hex?: boolean;
}
Our debugger backend (go delve) can offer more flexible formatting options (based on a go-specific formatting verbs users can provide, e.g., %v, %x, ... ) and I wish we could take advantage of it. What do you think about adding a free-form string 'format' field? I can imagine other language debug adapters may have their own, language-specific way of formatting their data types.
I looked into a way how java debugger support a variety of formatting options (custom command to switch the formatting + invalidated event), but I am afraid that disallows different formatting per value (I may be wrong here).
ps. Is VSCode utilizing value formatting options any where? I don't see a control knob that allows me to select hex format. I can file a separate issue in the other repo for that.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ValueFormat definition and the Variables and Evaluate request descriptions in the protocol specification. Review how the proposed free-form format would coexist with the existing hex option and per-value formatting, then confirm the change's schema and documentation requirements; done means an agreed protocol design rather than an implementation based only on this open discussion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100