A suspected pipe bomb exploded at the federal courthouse in downtown San Diego early Sunday, damaging a door and blowing out a window.