When debugging in production environments (which is always a bad idea) I use a technique where I always work together with a coworker and before I'm about to do something destructive I say out loud what I'm going to do and ask for agreement that I should continue. I started this after reading what happened at Gitlab a month ago.