what is debugging in computer programming:Csmates.com

Debugging and it's types
Debugging. (Csmates.com)


Software testing is a process that can be systematically planned and specified. Test design can be conducted, a strategy can be defined, and results can be evaluated against prescribed expectations.

Debugging occurs as a consequence of successful testing. When a test case monitors an error, debugging is the process used to remove such types of errors.

Debugging is not testing but it always occurs as a consequence of testing. The debugging process begins with the execution of a test case. Debugging is also treated as an art (Bradly 1985).

The debugging process attempts to match symptoms with cause, thereby leading to error correction. There are two outcomes of this debugging.

Debugging Techniques

Here are 7 types of debugging techniques 
  • Brute Force Testing
  • Backtracking Testing
  • Debugging by Induction
  • Debugging by Deduction
  • Cause Elimination Debugging
  • Debugging by Testing
  • Debugging by Program Slicing

Brute Force Debugging

Brute Force Debugging methods are applied when all else fails, Brute force debugging is debugging with a storage dump.

Brute Force Debugging is the most and common using debugging technique but also the least efficient one. In this technique, the program is loaded with the print statement to print the intermediate values with the hope that some of the printed values will help to identify the states with an error. 

Peoples who use thinking rather than a set of bits of help, exhibit superior performance. This approach becomes more systematic with the user of a symbolic debugger because values of different variables can be easily examined.

Backtracking Debugging

It is a fairly using debugging technique. This involves backtracking the incorrect results through the logic of the program. In this technique, the source code is traced backward until the error is discovered. 
This technique becomes unfit when the number of source lines to be traced back increases and the number of potential backward paths becomes unmanageable.

Debugging by Induction

This is the process that locates the data, organizes it, and devices a hypothesis. This hypothesis must be proved. A clue structure may be used for what, where,  when and to what extent for categories for Is and Is not

Debugging by Deduction

The deduction may also be used as a debugging technique. Determine the possible causes and use data to eliminate the cause. Refine the remaining cause into a hypothesis and prove it.

Cause Elimination Debugging 

In this technique, a list of causes that could have contributed to the error symptom is prepared and tests are carried out to eliminate each cause. Software fault tree analysis techniques may be used to identify the errors and these error symptoms. 

Debugging by Testing

This debugging type involves using test cases. There are two types of test cases.
  • Cause that exposes a previously undetected error.
  • And cause that provide useful information in debugging to locate an error.
For an undetected error, cases tend to cover many conditions per test case. But these test cases for locating a specific error cover a single condition for each test case.

Debugging by Program Slicing

This debugging technique is mostly similar to backtracking. In this, the overall search space is first divided into the program slices so that the search is confined to the program slice only.

A program slice is a particular variable at a particular statement is a set of source code lines preceding the statement that can influence the value of that variable.

Post a comment