I have been reading Walter Isaacson’s super-insightful book, The Innovators, on the people and history behind the computer and the internet, and found this fascinating bit on the origin of the computer bug on September 9, 1947.
The Mark 2 version of the Harvard computer was in a building without window screens. One night the machine conked out, and the crew began looking for the problem. They found a moth with a wingspan of four inches that had gotten smashed in one of the electromechanical relays. It was retrieved and pasted into the log book with Scotch tape. “Panel F (moth) in relay,” the entry noted. “First actual case of bug being found”. From then on, they referred to ferreting out glitches as “debugging the machine”