Inspect using the Debug trait
Hi!
First of all, thanks for this amazing work.
I'd like to propose to display values (when, say, you use the var command or on the TUI interface) using the information available in the Debug trait for the types that implement it instead of displaying the raw data. It would be much easier to inspect and navigate the data if we saw the data as it was meant to be displayed in a debug context. This visualization could eventually be made togglable if the user needs to see the raw data.
Thanks for your rating!
This is definitely a great idea. But at the moment I don't know how to implement it, there are too many questions. For example, in which process should we execute the Debug::fmt function (in debugger or in debugee), or what if the Debug::fmt function has side effects.
I will definitely look into these questions, but unfortunately not in the near future.
Nice!!! I'm gonna try it as soon as I have some time.
Thank you!
You're welcome! Please note that there is one limitation: the implementation of the Debug::fmt trait must exist in the code generated by the compiler. In other words, if you have a Foo structure that implements Debug, there should be one or more places in the program where it's actually used (or the compiler will remove this code).