Software Development

What is Debugging?

Quick answer

The process of finding, understanding, and fixing errors, or bugs, in software code.

Debugging, explained

Debugging starts when software behaves differently from what is expected. Developers reproduce the problem, narrow down where it happens, identify the cause, fix it, and confirm the fix works without breaking anything else. Tools include debuggers that pause code and show variable values, log files, error monitoring services, and automated tests.

For example, if customers report that discount codes sometimes fail at checkout, a developer might find in the logs that failures happen only for codes entered with a trailing space, then fix the input handling and add a test for that case. The term is often linked to a 1947 incident in which engineers found a moth in a Harvard computer, though the word bug was already in use. Good debugging relies on patience and careful observation.

Related terms

Guides that mention Debugging