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 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 progragrammer must know how to fix the problem as knowledge about problem analysis is expected. When the bug is fixed,
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.