You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Could the ValueFormat potentially include say a mimeType?
This could be helpful for variables that represent other things like an image, if you could hover over the image and see a preview of what it contains. The hex variable could just be the mime type application/octet-stream.
Activity
ashgti commentedon Mar 4, 2022
Could the
ValueFormatpotentially include say amimeType?This could be helpful for variables that represent other things like an image, if you could hover over the image and see a preview of what it contains. The
hexvariable could just be the mime typeapplication/octet-stream.