Configure debugger to use String() method
Answered
It would be very nice to be able to configure the debugger to display the result of the `.String()` method for a particular type to display a human readable version of that object.
Context:
I work in Cryptography so I deal a lot with finite field elements in Montgomery form. Due to the nature of the Montgomery representation, even if the field element corresponds to a small number like 1 or 2, it still is a long, random looking byte slice. I already have a `.String()` method that converts the element back into a readable number but I don't know how to get the debugger to use it.
Please sign in to leave a comment.
Hello,
Please see: https://youtrack.jetbrains.com/issue/GO-7241/Emulate-Stringer.String-in-debugger#focus=Comments-27-3531200.0-0
Does it help?
Hi! Thank you, that would help in many cases but doesn't help with mine. It seems that only functions with "trivial" logic are supported whereas my `.String()` method, although non-mutating, is more complex, involving some field arithmetic.
Hi,
Please follow GO-7821 and Relates to tickets depending on your workflow.