Skip to content
Why Is It Called 'Debug'? — The Origin of the Term

Why Is It Called 'Debug'? — The Origin of the Term

DodaTech Updated Jun 20, 2026 3 min read

The Story

When Grace Hopper and her team found a moth stuck in the Harvard Mark II’s Relay #70 on September 9, 1947, they didn’t just find a bug — they performed an act of debugging. She removed the moth, taped it into the logbook, and wrote: “First actual case of bug being found.”

The story is so perfect that most programmers assume Hopper invented the term. She didn’t — but she gave it a mascot.

The word “debug” was already circulating in engineering circles. In the 1930s, engineers debugging vacuum tubes were literally removing insects attracted to the heat. In the 1940s, aircraft mechanics debugged engines by clearing out insect nests and debris. The Oxford English Dictionary traces “debug” meaning “to remove insects from” back to at least 1945.

Hopper herself was careful to credit the existing usage. In interviews, she noted that “bug” was already a term in radio and electrical engineering. The moth just gave the word a story that everyone could remember.

How It Evolved

As programming became a profession, debugging grew from pulling moths out of relays to systematic code review. By the 1960s, debugging was a recognized phase of software development. The first debugging tools — like dbx on Unix — appeared in the 1970s.

Today, debugging is a discipline unto itself. Integrated development environments have visual debuggers with breakpoints, watch variables, and call stack inspection. The term is universal across every programming language and platform. Yet the core action is the same as what Hopper did in 1947: find the problem, understand it, and remove it.

Did You Know?

Admiral Grace Hopper was one of the first programmers of the Harvard Mark I and invented the first compiler, the A-0 system. She also popularized the term “compiler” and advocated for programming in English rather than machine code. She received the National Medal of Technology in 1991.

FAQ

Did Grace Hopper invent the word 'debug'?
No. “Debug” was used in engineering (especially aviation and electronics) before computers. Hopper popularized it by literally removing a moth from a computer and documenting it in the Mark II logbook.
What's the difference between debugging and testing?
Testing finds failures — debugging finds the root cause. Testing reveals that something is broken; debugging identifies why. You can have automated tests, but debugging is a manual investigation.
What was the first debugger?
The first interactive debugger is generally considered to be dbx, created at UC Berkeley for Unix in the early 1980s. Before that, debugging was done with print statements, core dumps, and careful code reading.

Related Etymologies

Why Is It Called 'Bug'? Why Is It Called 'Patch'?

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro