A bug can be more easily fixed when it's known in what part of the program it resides. Using debug-output and assertions can be used to locate the part of the program where the bug manifests itself. When the part has been narrowed to a single procedure or a couple of instructions, careful reading will result in finding the bug most of the time.