Software Debugging starts after a successful test. Unlike software testing, the debugging task is to further diagnose and correct potential errors in the program. There are two main debugging tasks: one is to determine the exact nature and location of errors in the program, and the other is to modify and eliminate errors in the program.
The debugging procedure is as follows:
(1) determine the error location in the program starting with the external representation of the error;
(2) procedures related to medicinal liquor to find out the internal cause of the error;
(3) modify the design and code to eliminate this error;
(4) Repeat the original test or some related tests that have exposed this error.
Debugging method:
(1) Forcible troubleshooting
Set print statements in specific parts of a program, track program execution, and monitor changes to important variables. You can also use debugging functions in some programming languages or specialized interactive debugging tools, analyze the dynamic process of the program by designing breakpoints and other methods.
(2) backtracking debugging
Analyze the error symptom to determine the symptom location, manually trace the source code along the control flow of the program, and find the cause of the error.
(3) inductive debugging
Organize error-related data for analysis to identify possible causes. Export one or more assumptions about the cause of the error, and use existing data to prove or exclude these assumptions. If the existing data is not enough to prove or exclude these assumptions, You need to design and execute some new test cases and get more data in the future.
(4) debugging by Compaction Method
During debugging, we first figured out many possible causes of errors, and then the view used tests to eliminate the causes of each assumption. If the test shows that the cause of a hypothesis may be the real cause, the data is refined to determine the bit error.