Be Prepared
Like Scar says (sings) in The Lion King, “Be prepared.”
Bugs are going to happen. Debugging is going to happen. It’s a lot easier to deal with this if you are prepared.
Have your IDE ready to quickly attach. Have symbols or sourcemaps configured and ready to go. Have complete and actionable logging in place and accessible.
You want to be as proactive as possible, detecting issues before they get to customers. For the ones you miss, you want to know all about them before your customers tell you.
Have crash reporting, system monitoring, and server logging all set up ahead of time. Then test them.
It doesn’t feel good to spend time setting up facilities to debug an issue when what you are trying to do is debug an issue as quickly as possible.