Some general debugging tips

Here are some general 'tips & tricks' which proofed to be useful over the last years.

KISS: Keep It Simple and Stupid

Try to reduce the problem by building a sample application. With the new 'AppWizard' it does take less than a minute to build a running MFC application! So whenever you encounter a problem or start programming in a new area (like 'OLE automation' or 'owner drawed controls') build a new test appliction. There you can fool around and the rebuilds are fast!

Use the 'Debug Windows'

There are 6 Debug Windows in the IDE aside from 'Variables' and 'Watch' the 'Call Stack' and the 'Memory' window are the ones I use the most.
If you set your breakpoints smart the 'Call Stack' will give you a exellent view of when and where your methods are called and what paramter are used.
You don't have to be an assembler wizard to make use of the 'Memory' Window. Most time I use it to watch some values which are not shown completly in the 'Watch Window'
Try the context menus on the 'Debug Windows' (right mouse click) they have some nice features!

Use all available resources

There are tons of useful information available. The one I use the most is the MSDN CD (Microsoft Developer Network). These 2 CDs are published quarterly by Microsoft and contain a lot of excellent examples and technical information.
You can search the same knowledge base on the web: http://support.microsoft.com/support. But sometimes it takes quite some time to get an search result...so I prefer the CDs!
To get more information about MSDN go to: http://www.microsoft.com/msdn

There are a lot of other useful sites on the net, check them out. Many have a discussion board and free source!
Chances are good that somebody out there solved the same problem before. Don't try to reinvent the world!
A good place to start is the 'Links' - page on this site.

Read, read, read

There are many magazines and to many books regarding MFC/MSVC/Win32. Some of them are excellent and others but a lot aren't worth the paper! Check your local bookstore and those on the web!

(Maybe Zafir will setup a new section on this site with book reviews...)

To get the latest on debugging check John Robbins 'Bugslayer'- column in the 'Microsoft System Journal' at http://www.microsoft.com/msj
He is an expert on debugging and he also shares tips in his column some of them you can find in this section.



Comments

  • first reply

    Posted by Legacy on 04/25/2002 12:00am

    Originally posted by: nopolin

    This is the first time that I give a comment here!

    Reply
  • aditya

    Posted by Legacy on 03/14/2002 12:00am

    Originally posted by: aditya

    Hello EveryOne
    

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: August 14, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Data protection has long been considered "overhead" by many organizations in the past, many chalking it up to an insurance policy or an extended warranty you may never use. The realities of today make data protection a must-have, as we live in a data driven society. The digital assets we create, share, and collaborate with others on must be managed and protected for many purposes. Check out this upcoming eSeminar and join eVault Chief Technology …

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds