Have a debug checklist

Avoid debugging by gut feel or trial and error

have a checklist

Atul Gawade's The Checklist Manifesto teaches us:

The first step to addressing both of those points is to actually have a checklist. For whatever reason, I've never seen anyone debug according to an explicit checklist, but I think it might be worthwhile. Here's why.

why have a checklist?

Having a checklist is better for your coworkers and yourself.

my checklist

Here's my attempt at a personal checklist:

other advice

If things get really dire, I take a walk and think about something else and then, when I'm back at my desk, ask myself what do I actually know?

p.s. Julia Evans has a bunch of other debugging advice that you should check out.