Yeah. It really is. I mean, you can prove pretty trivially that programs become exponentially more complex in their potential behavior (and misbehavior) as they get longer. In a small program you're searching for a needle in a haystack, and in a big program (say 50 thousand lines?) you're searching for a needle in a small galaxy.
But you come up with some silly approach that you figure might possibly solve it... And y'know, after one or two tries, or maybe after several hours of doing that, lo and behold, one of them does.
So debugging may be an exercise in optimism, but that makes it especially neat that it actually works most of the time.