How do you debug step by step?

How do you debug step by step?

The following are the basic phases in debugging: Recognize the presence of a bug. Determine the bug’s origin. Determine the source of the bug. Find a solution to the bug. Apply the fix and put it to the test.