Here’s the original computer bug (shown above)

Debugging - Origins

In 1947, in the very early days of computing, a team of Navy computer programmers led by Grace Hopper ran into a problem with the mainframe. They spent many hours checking out the software. Finally, they opened up the computer and found a dead moth on a main circuit board blocking a relay. (Grace Hopper - Wikipedia)

This was the first computer bug, and it was a real bug - an insect - not a coding error.

Since then, errors in computer systems, particularly in software code, have been called “bugs.”

If a program has bugs, we want to get rid of them. That came to be called “debugging.”