Content deleted Content added
m Remove spam |
|||
Line 42:
After the bug is reproduced, the input of the program may need to be simplified to make it easier to debug. For example, a bug in a compiler can make it [[Crash (computing)|crash]] when parsing a large source file. However, after simplification of the test case, only few lines from the original source file can be sufficient to reproduce the same crash. Simplification may be done manually using a [[Divide-and-conquer algorithm|divide-and-conquer]] approach, in which the programmer attempts to remove some parts of original test case then checks if the problem still occurs. When debugging in a [[Graphical user interface|GUI]], the programmer can try skipping some user interaction from the original problem description to check if the remaining actions are sufficient for causing the bug to occur.
After the test case is sufficiently simplified, a programmer can use a debugger tool to examine program states (values of variables, plus the [[call stack]]) and track down the origin of the {{Not a typo|problem(s)}}. Alternatively, [[Tracing (software)|tracing]] can be used. In simple cases, tracing is just a few print statements which output the values of variables at
==Techniques==
|