The title is pretty self-explanatory. I often add traces when debugging, which requires adding the Debug.Trace
import. However, I equally often forget about removing those when I'm done.
What I'd like would be a "dev" switch which would add the import, so that when I disable it I could easily find all of the traces left in the code.
Why not import trace from an internal .Utils module rather than directly from Debug.Trace, and delete the export of trace
from that module when you are done?
It's different, but another expedient I picked up somewhere is to toggle between trace _ = id
and import Debug.Trace (trace)
. Then you can e.g. go back and forth between using (real) trace
and doing things like benchmarking, which is of course wrecked by trace
. Then when you are done with all that, you can delete the export of (either) trace
and hunt down all the remaining evidence that you ever used it in your project...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With