1. What Are Different Debugging Techniques?
Debugging techniques are not an easy process. It is as difficult as debugging
tools.
Below given are some important debugging techniques:
1) Brute force debugging
2) Backtracking debugging
3) Debugging by induction
4) Debugging by deduction
5) Cause elimination debugging
6) Debugging by testing
7) Debugging by program slicing
These different debugging techniques are discussed below:
1) Brute force debugging
· Brute force debugging techniques are applied when all else fails.
Brute force debugging is the technique of debugging with a storage dump.
· Brute force debugging is always considered as the most common
debugging technique but also the least efficient one.
· In this debugging technique, the program is always loaded with print
statements to always print the common or intermediate values with the fortune
that a few of the printed values will comfort to identify the statement with
error.
· This debugging technique becomes more systematic with the exertion of
a symbolic debugger because values of disparate variables can be easily
examined.
2) Backtracking debugging
· Backtracking is a fairly common debugging technique. This involves
“Backtracking“ the incorrect results always through the logic of the program.
· In backtracking debugging technique, the source code is outlined
backwards until the error is discovered.
· This debugging technique considered as the unfit when the “no“ of
source lines to be outlined back increases and the affecting number of potential
backward paths becomes unmanageable.
3) Debugging by induction
· This debugging technique is a process that always organizes, locates
the data, and devises a hypothesis also. This hypothesis must then be proved
too.
· It is a technique in which clue structure may be used for following
like what, where, when and how.
4) Debugging by deduction
· Deduction is also used as a crucial debugging technique.
· Terminate the possible causes and use data to eliminate causes.
· This technique always refine the remaining cause into a hypothesis and
than prove it.
5) Cause elimination debugging
· In this debugging technique, a list of scrape or causes that could
have promoted to the error symptom is prepared and tests are bear out to
eliminate each cause.
· A technique related to software fault tree analysis may be handled to
classify or identify the errors from the “error symptom“.
2. 6) Debugging by testing
This thinking type debugging involves the use of test cases. There are always
two types of test cases.
· Test cases that always expose a previously undetected error/defect.
· Test cases that also provide useful and crucial information in
debugging to locate an error and defect.
For an undetected error cases tend to cover several conditions per test case.
But keep in mind that test cases for locating a specific error always cover a
single condition for every test case.
7) Debugging by program slicing
· This technique of debugging is very similar to backtracking debugging
technique.
· In this debugging technique, the overall search space is first divided
in the program slices so that the effective search is moderate to the program
slice only.
· A program slice for a detailed variable at a detailed statement is the
set or intent of source lines preceding this statement that can affect the value
of that variable.
Conclusion:
At end we conclude that debugging techniques are quite important because they
save the lots of time to detach or remove the problem.
Related Post: