Title: RE: [MSVC] [Slightly OT] Finding bugs


> -----Original Message-----
> From: BeginThread.com MSVC List [mailto:[EMAIL PROTECTED]]On Behalf
> Of Phil Daley
> Sent: 22 April 2003 13:02
> 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??

When you don't know where the bug is, I normally resort to printing out as
much information about structures and classes in my code as possible - for
example, if you have a structure representing something major, print out its
contents at key points to see if something isn't as it should be.

It might seem that debugging is easier, but honestly, seeing the whole set
of information in one bundle (or formatted better than the variables window
can show) makes a big difference. It also means that you don't have to worry
about when to put breakpoints and view the data - having the key moments of
the structure's life detailed automatically into a file just saves you that
hassle

I also found that using message boxes to indicate what part of the code I
had gotten to, while irritating during normal program operation, is very
handy to narrow down when the problem occurs. Then you stand a chance of
being able to debug it properly using breakpoints and stepping instead of
less handy ways.

--
Jason Teagle
[EMAIL PROTECTED]

Reply via email to