On successful culmination of software testing, debugging is performed. Debugging is defined as a process of analyzing and removing the error. It is considered necessary in most of the newly-developed software or hardware and in commercial products/personal application programs. For complex products, debugging is done at all the levels of the testing.
Debugging is considered to be complex and time-consuming process since it attempts to remove errors at all the levels of testing. To perform debugging, debugger is used to reproduce failures, investigate the state of programs and find the corresponding defect. Debuggers enable programmers to execute programs step by step, to halt a program at any program statement and to set and examine program variables.
Guidelines for debugging
Some guidelines that are followed while performing debugging are :-
Debugging is the process of solving problems. Hence, individuals involved in debugging should understand all the causes of an error before starting with debugging.
No experimentation should be done while performing debugging. The experimental changes instead of removing often increase the problem by adding new errors in it.
When there is an error in one segment of a program, there is a high possibility of the presence of another error in that program. So, when an error is found in one segment of program, the rest of the program should be properly examined for the presence of errors.
It is necessary to confirm that new code added in a program to fix errors is correct and is not introducing any new error in it. Thus, to verify the correctness of a new code and to ensure that no new errors are introduced, regression testing should be performed.
The Debugging Process :-
During debugging, errors are encountered that range from less damaging to catastrophic. The various levels of errors increase, the amount of effort to find their causes also increases. One errors are identified in a software system, to debug the8.
Problem, the following steps are used.
1. Defect confirmation/identification: - A problem is identified in a system and a defect report is created. A software engineer maintains and analysis this error report and finds solution to the following questions.
> What is the expected/desired behavior of the system?
> What is the actual behavior Brute force.
> Does a defect exist in the system?
2. Defect analysis: - If the defect is genuine, the next step is to understand the root cause of the problem. Generally, engineers debug by starting a debugging tool and they try to understand the root cause of the problem by the following a step-by-step execution of the program.
3. Defect resolution: - Once the root cause of a problem is identified, the error can be resolved by making an appropriate change to the system by fixing the problem.
After the debugging process ends, the software is retested to ensure that no errors are left undetected. Moreover, it checks that no new errors are left undetected. Moreover, it checks that no new errors are introduced in the software as a result of change made to it during the debugging process.
More articles: Engineering