Refactoring is a pleasure for me IF AND ONLY IF there is a decent unit test/functional test suite for whatever I'm working on!
There's a funny perk to bughunting... the amount of time it can take is nondeterministic so you can take breaks during it (they help you find the root cause, anyway, by clearing your head) and nobody will complain. "I'm thinking about the bug! Backburner debugging!"