The purpose of software debugging is: to correct errors. Software debugging is the process of testing the prepared program manually or by compiling the program to correct grammatical and logical errors before putting it into actual operation; it is an indispensable step to ensure the correctness of the computer information system.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
The purpose of software debugging is: to correct errors.
Software debugging generally refers to the process of reproducing software defects, locating and finding the root cause of the problem, and finally solving the problem. Software debugging usually has the following two different definitions:
Definition 1:
Software debugging is to discover and eliminate errors in software programs, which can be done through a certain method A method to control the execution process of the debugged program so that you can view and modify the execution status of the debugged program at any time. In this definition, software testing is part of software debugging, similar to the Oxford dictionary definition of debugging. Debugging is defined in the Oxford Dictionary as: "The process of identifying and eliminating errors in computer hardware or software."
Definition 2:
Debugging is the execution of a successful test What to do next. The so-called successful testing means that it can prove that the program does not achieve the expected functions. Debugging consists of two steps, starting from the execution of a successful test case and discovery of problems; the first step is to determine the exact nature and location of the suspicious error in the program; the second step is to modify the error. In this definition software testing is separated from debugging work.
Software debugging is to manually or compile the program before putting the compiled program into actual operation. The process of conducting tests and correcting grammatical and logical errors.This is an essential step to ensure the correctness of the computer information system. After the computer program is compiled, it must be sent to the computer for testing. Based on the errors found during the test, further diagnosis is carried out to find out the causes and specific locations for correction.
The term debugging can mean a lot of different things, but most literally, it means removing errors, exceptions, and bug. Now, there are many ways to do this. For example, you can debug by scanning the code for typing errors or using a code analyzer. You can use the performance profiler to debug your code. Alternatively, you can use a debugger to debug.
##According to definition 1,The basic process of software system debugging is as follows:
Conduct a trial calculation of the modified program. At this time, you can assume several simulated data to trial run, and compare the output results with the correct results of manual processing. If there is a difference, it indicates that there is a logical error in the computer program. If the program is not large, you can use manual methods to simulate the computer to modify and process these data of the source program; if the program is relatively large, manual simulation will obviously not work. At this time, you can only set the computer to single-step execution. Step tracking program execution. Once the problem is found, the source program still needs to be modified using an editing program, and then it still needs to be compiled, linked, and executed until there are no logical errors. You can also compile it after completion.
According to definition 2, the basic process of software system debugging is as follows:
Reproduce the problem: Reproduce the problem discovered by software testing;
##Problem location: Determine the location of the program segment where the problem may occur;
#Find the cause: analyze the relevant code and determine the problem causing the defect The internal reason;
## Design plan: put forward Solutions to software defect problems;
## Modify the code : Modify the program code according to the design plan;
# Verification and validation: Use techniques such as review, analysis, and testing to determine whether errors have been eliminated and whether new errors have been introduced.
##In these steps, problem location and finding the cause are key aspects of software debugging, and its workload accounts for about 90% of the total workload. %above. Software debugging is a time-consuming, laborious, and skillful task. Currently, there are many studies on problem location in software debugging.It can be seen that the process of definition one is more suitable for our daily development and testing work; while the process of definition two is more suitable for our testing, especially the work related to the problem found after software release or online.
FAQColumn!
The above is the detailed content of What is the purpose of software debugging?. For more information, please follow other related articles on the PHP Chinese website!