debugging
Debugging is the work of finding and fixing why a program does not do what it should.
In plain terms
Imagine a dripping tap in the kitchen. Wiping away the water is not enough: you must find where it is leaking, what causes it, and fix it without damaging the boiler. Debugging is the same in the world of software: from the symptom (the application freezes, the wrong amount appears on the bill), you must trace back to the root cause.
Programmers spend a significant part of their working time not writing new code but tracing errors in existing code. The profession calls such an error a "bug" (literally "beetle"), hence the name debugging.
AI is now also involved in this. A coding agent can read the error message, review the code, run the program, try a fix, and verify whether it works. Debugging is no longer just a programmer's concern: you can also ask an AI to find out why your spreadsheet formula or website is not working.
How it works
- Reproducing the bug: first, you need to make the bug show up reliably, again and again, because what cannot be reproduced is hard to fix.
- Narrowing the scope: error messages, logs (runtime records of the program), and step-by-step execution reveal where the code goes wrong.
- Assumption about the cause: the developer or the agent formulates what they believe is the problem and checks with a targeted test whether that is indeed the case.
- Fix: changing the code so that it removes the cause rather than just masking the symptom.
- Verification: running tests to confirm the bug is truly gone and the fix did not break something else.
An everyday example
Your banking app logs you out every time you try to open your transaction history after an update. The bank's developers reproduce the error from incoming bug reports, find the faulty line of code, fix it, and a few days later, a new update arrives with the note 'bug fixes'.
Who is affected
A common misconception
Limits and risks
- Debugging only finds the bug someone noticed; it does not prove the program has no other bugs.
- An AI agent can confidently give a false explanation for the cause of an error, so fixing it should be checked with a test and human review.
- A fix can cause a new error in another part of the program, so previously working parts must be retested after the change.
- Detecting rare, randomly occurring bugs is difficult for both humans and AI and can take a long time.
Similar, but not the same
- testing – Testing shows that there is a bug (it cannot prove there is none), while debugging reveals why it exists and how it can be fixed.
- code review – In code review, someone reads the code before it goes live to prevent errors, whereas debugging investigates an error that has already occurred.
- refactoring – Refactoring makes the structure of working code more readable without changing its behaviour; debugging fixes faulty behaviour.
Related concepts
software development, software quality
log analysis, breakpoint, error message
testing, coding agent, code verification, refactoring, szoftverhiba (bug)
A brief history
Engineers used the word 'bug' for technical faults as early as the 19th century, for example in a letter by Thomas Edison in 1878. According to a favorite story in the profession, in 1947 a stuck moth was found in a relay of the Harvard Mark II computer, which was pasted into the computer log with the joking remark that this was the first time a real bug had been found. The word does not originate from this case; the story only popularized it.
Where things stand
Debugging is a fundamental, everyday part of software development. At the end of 2026, coding agents at many development teams already regularly take part in reproducing, fixing, and verifying bugs, but the result is typically still reviewed and approved by a human.
In the news
- Survey: 67% of developers use AI for code generation, 61% for debugging, only 20% in productionNov 7, 2026 · Code
- Survey: AI-generated code shifts the bottleneck to debugging, slowing releasesOct 7, 2026 · Code
- When is vibe coding a good choice? A practical case of an internal office appOct 5, 2026 · Code
- Undo research: AI agents push debugging to 42% of the workweekSep 29, 2026 · Code
- MCP ecosystem expands with Docker catalog, Rocket.Chat server and Chrome DevTools, while security lagsAug 31, 2026 · Code
- Research on AI coding's impact: slower debugging, an inconclusive METR study, mythsAug 4, 2026 · Code
Also known as
debugging · debugging · debugging · debugging · troubleshooting · bug fixing · bug hunting · debug
This entry was machine-edited and has undergone machine expert review; the “In the news” section updates automatically from Agent Age stories.