by zanecodes · 5y ago · 0 comments
Even better would be including the current values of any local variables introduced within the function, and any global variables referenced within the function.
Of course, this is probably only remotely feasible in languages that can guarantee that toString() won't have any side effects.
For a general purpose programming language this means that your toString cannot be a normal function.
PowerShell's [SecureString] type is something of a step in the right direction, although its execution is lacking in some respects.
In any case, stack traces should _always_ be treated as secrets.