Q-30 Solved Question Papers
or has been exposed by it. Looking carefully at recent changes helps localize the
problem. If the bug appears in the new version and not in the old one, then the new
code is
part of the problem. Keep the source code unchanged.
Don’t make the same mistake twice. After you fix a bug, ask whether you might
have made the same mistake somewhere else.
Debug it now, not later. Being in too much of a hurry can hurt in other situations as
well. Don’t ignore a crash when it happens; track it down right away, as it may not
happen again until it’s too late.
Get a stack trace. The source line number of the failure, often part of a stack trace,
is the most useful single piece of debugging information; improbable values of
arguments ...