Software Debugging-Debug

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.