How Do You Diff?

The other day I was working on a page that made heavy use of JavaScript. I'd been cool about it actually; I was using Prototype and Scriptaculous as the framework. I was even testing with virtual machines and everything!

What is important is that it was fixed. For that, I went through my source (SVN) repository and found the file that worked. Easy really.

This still left the issue of why it happened though.

Quick aside: I don't understand people who just accept that something works (ie; it broke, I fixed it, I'm done). How can you not need to figure out what happened? How will you prevent this from happening again?