Home  >  Article  >  The task of program debugging is

The task of program debugging is

(*-*)浩
(*-*)浩Original
2019-10-23 09:31:3411658browse

Program debugging is the process of testing the prepared program manually or by compiling the program to correct grammatical errors and logical errors before putting it into actual operation. This is an essential step to ensure the correctness of computer information systems.

The task of program debugging is

#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.

Steps (Recommended learning: web front-end video tutorial)

The first step is to use an editing program to edit the compiled source program according to A certain writing format is sent to the computer, and the editing program will add, delete, or modify the source program according to the user's intention.

The second step is to translate the incoming source program into machine language, that is, use a compiler to check the source program's grammar and translate the source program statements that comply with the grammatical rules into a "language" that the computer can recognize.

If a grammatical error is found after checking by the compiler, you must use an editing program to modify the grammatical errors in the source program, and then compile again until there are no grammatical errors.

The third step is to use the connection program in the computer to connect the translated computer language programs and build it into a program that the computer can actually run. During the connection process, connection errors generally do not occur. If connection errors occur, it means that there are problems such as confusion in subroutine calls or incorrect parameter transfer in the source program.

At this time, you need to use the editing program to modify the source program, and then compile and connect it. This is repeated until there are no connection errors.

The fourth step is to 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 the data of the source program;

If the program is relatively large, manual simulation will obviously not work. At this time, the computer can only be set to single Step-by-step execution mode, track the operation of the program step by step. 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.

The above is the detailed content of The task of program debugging is. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn