Configure debugger to use String() method

已回答

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.

0

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.

0

Hi,

Please follow GO-7821 and Relates to tickets depending on your workflow.

0

请先登录再写评论。