How to Find a Bug by Isolating
Make a backup of your source., Erase a small section, and put in the small something instead., See the result., Go smaller.
Step-by-Step Guide
-
Step 1: Make a backup of your source.
You will want a checkpoint that you can go back because you will go back later. -
Step 2: Erase a small section
Like a message box, a white space, a constant number variable (to erase an algorithm), etc.
Sometimes, the placeholder will have to have the same size as the part you took out.
You can do anything to it, because you have the backup. , Does it work perfectly now? The bug was in the erased part, so go to the next step.
Does it work even funkier than before? Undo the erased part and try again.
Does it give the same results as last time? At least you know it isn't there. , Undo the erased part, put markers around it, and try to find the exact place of the bug by the same method, in the markers. -
Step 3: and put in the small something instead.
-
Step 4: See the result.
-
Step 5: Go smaller.
Detailed Guide
You will want a checkpoint that you can go back because you will go back later.
Like a message box, a white space, a constant number variable (to erase an algorithm), etc.
Sometimes, the placeholder will have to have the same size as the part you took out.
You can do anything to it, because you have the backup. , Does it work perfectly now? The bug was in the erased part, so go to the next step.
Does it work even funkier than before? Undo the erased part and try again.
Does it give the same results as last time? At least you know it isn't there. , Undo the erased part, put markers around it, and try to find the exact place of the bug by the same method, in the markers.
About the Author
Dorothy Taylor
Specializes in breaking down complex organization topics into simple steps.
Rate This Guide
How helpful was this guide? Click to rate: