Debugging is the process of identifying and correcting errors occurred in a software product.
Whenever a software fails, we would like to understand the reason behind it for such failures.
After the reason is known, we can attempt to make necessary changes in the source code andtry to find the solutions. Those changes can remove the reason for that software failure.
Since, debug means detecting and correcting/removing errors from the software program. Whenever a program generates an unexpected behavior, it is known as failure of program.
The process starts after receiving a failure report either from the testing team or from users.
Debugging Process : Software Testing
The steps to debug a software product are:
Replication of Bug: It means, to recreate the undesired behavior under controlled scenario.
Understanding the Bug: After the replication is done, the reasons for the failure are searched.
Locating the Bug: Locate the bug in the program/code.
Fixing the Bug and Retesting the program: The bug is fixed in this step by making necessary changes to the program and finally the program is retested again.
Debugging : Easy or Difficult?
Debugging itself is a very difficult process because of the involvement of humans.
Another reason due to which it is considered as difficult because it consumes a large amount of time and resources too.
Whenever a programmer is debugging a program, all he is doing is taking out the bugs that he put in when writing the program. This is clearly a waste of time and energy, particularly when there are pressures on budgets and timescales. So why not do a better job from the beginning?
Also, due to this developers becomes uncomfortable after receiving any request of debugging as it is taken against their professional pride.