The hardest bug that I've ever had to debug was (gasp) a quirk in Internet Explorer. Older versions of IE did not initialize the methods of console until the debugging console was activated. So if your JavaScript code called console.log(), an error would occur. But as soon as you opened the debugging console to investigate, the failure conditions no longer exist. Took me several days of stumbling around in the dark until I finally happened across a SO post describing the bug.