Definition: Debugging is the process of detecting and removing of existing and potential errors (also called as 'bugs') in a software code that can cause it to behave unexpectedly or crash. To prevent incorrect operation of a software or system, debugging is used to find and resolve bugs or defects. When various subsystems or modules are tightly coupled, debugging becomes harder as any change in one module may cause more bugs to appear in another. Sometimes it takes more time to debug a program than to code it.
Description: To debug a program, user has to start with a problem, isolate the source code of the problem, and then fix it. A user of a program must know how to fix the problem as knowledge about problem analysis is expected. When the bug is fixed, then the software is ready to use. Debugging tools (called debuggers) are used to identify coding errors at various development stages. They are used to reproduce the conditions in which error has occurred, then examine the program state at that time and locate the cause. Programmers can trace the program execution step-by-step by evaluating the value of variables and stop the execution wherever required to get the value of variables or reset the program variables. Some programming language packages provide a debugger for checking the code for errors while it is being written at run time.
Here's the debugging process:
- Reproduce the problem.
- Describe the bug. Try to get as much input from the user to get the exact reason.
- Capture the program snapshot when the bug appears. Try to get all the variable values and states of the program at that time.
- Analyse the snapshot based on the state and action. Based on that try to find the cause of the bug.
- Fix the existing bug, but also check that any new bug does not occur.
Visit My Blog: http://vinay-kumar-saini.blogspot.in/
No comments:
Post a Comment