toString
Michelle Long
HappyDance321 at gmail.com
Mon Dec 31 18:37:31 UTC 2018
On Monday, 31 December 2018 at 15:39:05 UTC, Rainer Schuetze
wrote:
>
>
> On 31/12/2018 11:13, Michelle Long wrote:
>> Display variables in the watch shows the variables in a flat
>> list. Can we just get an override for toString or some other
>> method to change what is displayed?
>>
>> Surely this can be accomplished?
>>
>> Even if it means creating an external DLL that Visual D can
>> read and choose the right function and use it to take the
>> object and return a string and simply display that string
>> instead of whatever Visual D is generating internally?
>>
>> struct S
>> {
>> int x;
>> }
>>
>>
>> Somewhere
>>
>> auto S_toString(S s)
>> {
>> return "S: "~s.x;
>> }
>>
>> Should be very simple to do. Visual D just uses that function.
>>
>>
>
> What you can do now when using the VS debugger with the mago
> extension (and not mago selected as debug engine):
>
Where do I get the mago extension? https://github.com/rainers/mago
Or is it build in to Visual D and there is another setting?
More information about the Digitalmars-d-ide
mailing list