I've seen many resources strongly encouraging programmers to not use Debug.Trace from production code because of the lack of referential transparency. I still don't fully understand the problem though, and can't seem to locate the underlying reason.
My understanding is that tracing cannot alter the output of any expression (though it can in some cases cause expressions to be executed in a different order, or cause an expression to be evaluated that would have otherwise been lazily skipped). So tracing cannot affect the output of a pure function. It can't throw any sort of errors. So why is it fought against so strongly? (If any of my assumptions above are incorrect, please point it out!). Is it just a philosophical debate, or a performance thing, or could it actually introduce a bug in some way?
When programming in other, less strict languages, I often find it valuable to have a production application log values of interest to help diagnose issues that I am unable to reproduce locally.