Vezi pagina în română

IT Glossary

What is debugging, and how is it done?

The investigation that finds and eliminates the cause of a software error — the detective part of programming.

5
sections
6
questions answered

Debugging is the process of finding, understanding and removing the cause of an error in a program (a bug), from reproducing the problem to checking that the fix works. Fixing a software error has two radically unequal phases: discovering why it happens, and correcting it. The second often takes minutes; the first can take hours or days, and it is the core of debugging — reproducing the problem under control, progressively narrowing the suspect area, inspecting the program’s state step by step, reading the logs: detective work with specialized tools. For a company paying for software, understanding this ratio changes two practical behaviors. First, reporting: “invoicing doesn’t work” launches an expedition, while “for client X, an invoice with a discount and an advance payment shows a total off by 2 lei — here are the steps” cuts the investigation to a fraction, because reproduction is half the solution. Second, budgeting: debugging time is inherently uncertain, and applications built with good logging and monitoring are debugged much faster than black boxes — one reason the “observability” developers ask for during construction is not a whim but insurance, paid once and collected on every future incident.

Why it matters for your business

Causes eliminated, not symptoms cosmetized

Debugging carried to the root cause prevents relapse — an error “fixed” only at the surface finds its way back into production.

Incidents shortened by preparation

Logging and monitoring installed at build time turn multi-day investigations into checks of minutes — exactly when the site is on fire.

Collaboration that shrinks the invoice

Bug reports with reproduction steps cut billable searching hours directly — the simplest saving available on any maintenance contract.

How debugging translates into Romanian

The usual Romanian word is “depanare”: “a depana” is the verb and “depanator” is the tool (the debugger). The Romanian explanatory dictionary (DEX) defines “a depana” as putting a vehicle or machine back into working order after a breakdown, from French dépanner; the IT meaning extends it. The word “debug” itself is not in DEX.

Android’s official Romanian translation of its settings uses another phrase, “remedierea erorilor” (for example “Remedierea erorilor prin USB”). The meaning is the same. The error itself is called a bug; see the bug page.

The steps of debugging, from symptom to cause

The usual order: reproduce the problem under known conditions, narrow down where it happens, find the root cause (inspect the program’s state and read the logs), fix it, check with a test, ideally one that stays as a regression test, and note what you found. Without reproduction, the other steps become guesses.

Want an estimate for your project?

Message us on WhatsApp. We reply the same working day, and the first 30-minute call is free.

Book a free call

A debugger stops the program at a breakpoint and shows every value at that moment. The Chrome DevTools documentation says console.log() “may get the job done, but breakpoints can get it done faster”. For errors that only happen in production, logs and monitoring are the only witnesses, which is why they are built in from the start.

The git bisect command uses binary search through the change history to find the commit that introduced the bug. Explaining the problem out loud, to a colleague or a rubber duck (rubber duck debugging), is also a recognised technique.

Frequently asked questions

Why can a “minor” error take days to fix?

Because the smallness of the effect says nothing about the depth of the cause: a total off by a couple of lei can come from a rounding rule, a timing condition or data corrupted a year ago. Finding the cause is the investigation; the correction is usually the short part.

What does “we cannot reproduce the error” mean, and what should I do with that answer?

It means the program behaves correctly under the conditions the team knows about — so what’s missing are precisely your conditions: the account, the data, the browser, the moment. Help with exact steps, screenshots, time and user; genuinely non-reproducible errors are hunted differently, through extended logging and monitoring at the scene.

Can errors be prevented instead of expensively debugged afterwards?

To a large extent: automated tests, code review and small releases catch the bulk of defects before production, and the rest debug cheaply if the application logs well. The prevention budget is usually smaller than the firefighting one — but harder to get approved, because the fires that never happened are invisible.

What is the difference between testing and debugging?

Testing shows that an error exists and what it affects; debugging finds why it happens and removes the cause. Testing does not explain why the error occurred, while debugging looks for the root cause and the fix. The two run one after the other: the test finds the defect, then debugging repairs it.

What is USB debugging on a phone, and should it be on?

It is an Android setting under Developer options that lets a computer control the phone through ADB. Android’s own warning says it is for development purposes only and allows copying data, installing apps without notification and reading logs. If you do not develop apps, leave it off.

Where does the term debugging come from?

The term comes from English: de- + bug, meaning removing defects; it was already used in 1944–1945 for testing aircraft engines. The best-known story: on 9 September 1947, operators testing the Harvard Mark II found a moth trapped in relay number 70 and taped it into the log with the note “First actual case of bug being found”.