-
Notifications
You must be signed in to change notification settings - Fork 153
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.