I agree. Commenting out blocks of code is a last resort for me, rather than
a first.
First choices are to use a liberal amount of ASSERT statements and TRACE
statements, to make sure that the values you're expecting are indeed what
you're getting. I also use breakpoints and step through the code.
-----Original Message-----
From: BeginThread.com MSVC List [mailto:[EMAIL PROTECTED]]On Behalf
Of Phil Daley
Sent: Tuesday, April 22, 2003 8:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [MSVC] [Slightly OT] Finding bugs
At 04/22/2003 12:05 AM, Lemon, Craig wrote:
>How do you all go about this??
>
>You have a bug in your code somewhere, but you are not sure exactly where
>the problem lies. How do you find the bug??
Depends on what the bug is.
Different types have differing solutions.
But I would never comment out blocks of code to try and find a bug. That
is waaaay too slow.
Phil Daley < AutoDesk >
http://personal.monad.net/~p_daley
