How To Debug A Program

Table of contents:

How To Debug A Program
How To Debug A Program

Video: How To Debug A Program

Video: How To Debug A Program
Video: How to Debug Your Code 2024, November
Anonim

The creation of a program consists of several operations, which are collectively called the "life cycle". One of the most important steps is testing. Its main task is not to make sure that the work is correct, but to detect possible errors so that they do not become an unpleasant surprise for the customer later. How do you test programs?

How to debug a program
How to debug a program

Instructions

Step 1

Start testing the program. The first step is to debug the program. Debugging should be done by a programmer who wrote the source code or knows the required programming language. If you are any of the above, start checking your source code for syntax errors. Eliminate any errors found. Then do static testing. It must be done in order to debug the program.

Step 2

Check all documentation that has been obtained throughout the entire life cycle of the program. Check the terms of reference, specification and source code for compliance with coding standards. This will help determine how the program meets the customer's requirements. If you eliminate all inaccuracies in the documentation and program code, this will indicate the high quality of the software.

Step 3

When you're done debugging, move on to dynamic testing methods. They are used in the process of the direct functioning of the program. Check the correctness of the program using many tests from the previously prepared datasets. Each test will show you in which cases the program failed and crashed. You will need this information to troubleshoot the causes of these problems. Use the black box and white box methods for testing. The "black box" method involves identifying the maximum number of errors and malfunctions in one test.

Step 4

To do this, prepare two datasets. One must contain correct information, and the second is deliberately incorrect. After running this data through the program, establish the discrepancy between the real and predicted functions.

Step 5

Also use the "white box" method. It involves going through each operator in order to carefully examine the internal structure of the call. It tests all information paths, the exchange rate between branches and individual cycles. Each operator is traversed once.

Recommended: