1947: Harvard engineers working on the Mark II computer find a moth stuck to one of the relays. They tape it to a logbook and write "First actual case of a bug being found" and introduce the words 'bug' and 'debug' in the context of programming.
https://americanhistory.si.edu/collections/object/nmah_33466...