1

I know debugging and bug fixing are related and generally, bug fixing is considered as a subset of debugging (for example here in Wikipedia, "The process of finding and fixing bugs is termed "debugging"), but I wonder wether these two terms can be used instead of each other?

6
  • 1
    I'm not sure this sort of question is a good fit for this site (it's perhaps opinion-based to an extent, and little bit vague, with some unfounded assumptions about how people use these terms), so if you get some downvotes, that's why (downvoters often don't leave any comments). But, generally, when I hear that someone is "debugging", I tend to assume they are specifically using a debugger to see what the hell is even going on in the code, and why it's doing something unexpected. (Even though the term itself has a more general connotation.) I myself wouldn't use these terms interchangeably. Jun 14 at 15:59
  • 2
    I'm pretty sure "debugging" long lost it original meaning of "eliminating bugs" and and only means investigation part of why bug is happening (usually with some specific tool or technique including "Rubber Duck debugging")... Thus I'd not say that "bug fixing is a subset of debugging" - for me debugging itself does not mean bug will be fixed... and there are other way to find bugs to fix - i.e. code review. Jun 14 at 19:54
  • 1
    Honestly, this is a question of splitting hairs. It's like asking if eating and consuming food are the same thing.... If there are differences they are too pedantic to matter. Jun 16 at 12:55
  • @BerinLoritsch: which may be obvious to you, but not to anyyone else (especially not to the OP).
    – Doc Brown
    Jun 16 at 19:25
  • @BerinLoritsch But there's a difference between finding food and eating food.
    – Simon B
    Jun 17 at 8:36
6

If you want to be specific, debugging usually refers to the process of finding bugs, while bug fixing refers to making some change to code or otherwise that fixes the bug.

A software tool called a "debugger" does not usually make any changes to the code, or directly facilitate you making those changes. It may offer the ability to change values in memory or program state, but not the "persistent" source of the program.

7
  • 1
    Debugging is a somewhat unfortunate term as most developers indeed associate it with finding bugs, even though the word implies removing them, too. For a simple mistake, such as an off-by one error or incorrect order of operands in an operation, fixing the bug can often be done on the spot, but for complex bugs some redesign may be necessary, so actually fixing the bug may be done significantly later. Jun 14 at 15:59
  • 2
    @Hans-MartinMosner: I interpret "debugging" as research and analysis into the root cause of a bug. I also think of bug fixing as the act of fixing the bug (e.g. writing code). But I also use "bug fixing" in a more general sense that also includes researching and analyzing the root cause of a bug. It is interesting that these two terms aren't agreed upon, since they are bandied around so frequently. I do agree with this answer. This is definitely a subjective question, unfortunately. Jun 14 at 17:20
  • @GregBurghardt: Hans' argument is (I think) mostly related to the semantics of the word, i.e. to de-bug something is to remove bugs from it, similar to words such as deblock, deblur, decalcify, debarb, decompile, decriminalize, ... But yes, common usage has so often conflated the searching and fixing parts of the process that the specific words have blended together. Hardly anyone does one without the other by intention.
    – Flater
    Jun 16 at 12:40
  • 1
    @Flater But in debugging "SystemA" you may discover that the fault is "SystemB", and that you have no ability/authorization to make changes to "SystemB". So the act of making the fix is totally removed from the act of discovering the cause.
    – Peter M
    Jun 16 at 14:35
  • Making a change that fixes a bug is not bug-fixing. Making a change to fix a bug is bug-fixing. Intent is important. Jun 16 at 16:12
1

What does it matter? If you need to be clear whether you are investigating a cause or fixing behavior, then make the distinction that way. There's enough ambiguity between "bug fixing" and "debugging" that the average lay person might have different expectations than what you mean.

If you need to draw a distinction than use unambiguous words to mean what you intend. As it is, there isn't enough difference between the two terms to truly care. Bugs are bad, and they should be eliminated. You just need to decide if the bug is bad enough to hold up a release or if one bug is worse than another when scheduling fixes.

1

Debugging literally means taking out bugs: de + bug, just like desalination is removal of salt or deodorization is the removal of smell.

However, the word is also used in connection with tools, states and activities which assist in the identification of bugs, without perpetrating any removal:

  • breakpoint debugger

  • debug print statement

  • debug build; debug log/trace; debug mode; debug flag

In none of these usages could we replace the word debug with bugfix. It would either result in nonsense, or an altered interpretation. Therefore, this is a separate meaning which does not mean "fix bugs" but rather "contribute to finding an explanation for hard-to-understand and possibly defective system behaviors".

E.g. a "bugfix mode" would be some state of operation of correcting bugs whereas we understand that "debug mode" is some system's state in which it produces detailed diagnostics for better understanding of its internal operations. Nobody says "let's enable bugfixing and rerun the test, to see if we can get more information about the behavior".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.