Not all problems are nails. Not all solutions are hammers.

Published 20 February 06 06:57 PM

Hello gentle readers. I am sorry that I haven’t blogged for a while. I was at a convention for a week and then I came down with the flu. That wasn’t a bundle of fun but I am much improved for some rest.

I haven’t been doing much debugging lately for the reasons mentioned above but I thought that I would mention some tools that are core to debugging but which are not mentioned that often.

Perfmon is your friend in all performance issues and should be a core test tool. A common support issue is "Our system runs slow". The first question has to be whether it is CPU bound or something else bound. What tool can check pretty much everything? Perfmon can. The UI is not wonderful (IMHO) and making it an MMC snap-in was perhaps what I would have requested but for looking at performance and memory issues (so often linked), it rocks. It is also free. How can you not like that as a price point? It can also be run remotely and that is better than sitting in a cold server room.

The event log is often overlooked. I have seen a great many event logs crammed with errors. Sometimes these relate to the problem that the customer is seeing and sometimes they don’t but it is rare that a non-informational message is something that should be ignored.

For desktop applications, Spy++ is an excellent tool. Were the messages what you expected? No easier way to know than with this little tool.

Filemon and Regmon are both classics from www.sysinternals.com. I wouldn’t want to be without those. Even though the registry is not as central as it was when COM was king, it is still used a lot. Best yet, these tools require no instrumentation of your application and they are relatively non-intrusive.

I think that Assert statements are badly under used. If you can reproduce a problem in a debug build then often an assert will save you hours by getting you closer to the original problem than the actual crash or hang. They also compile away to nothing so sprinkling your code with them is pain free.

Detours (http://research.microsoft.com/sn/detours/) can be used for debugging. Ok, the latest version is commercial but the 1.5 version can be very handy indeed for capturing process state when a particular call is made. I have also seen it used very successfully as a temporary patch while a proper fix was being developed.

Good old fashion logging and tracing have largely fallen out of fashion but there are times when they are still the best choice. If you can’t live debug something and post-mortem debugging is not working out so well, these techniques can save your neck.

Signing off

Mark

by marklon

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# marklon Not all problems are nails Not all solutions are hammers | Weak Bladder said on June 9, 2009 2:36 PM:

PingBack from http://weakbladder.info/story.php?id=2211

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

This Blog

Syndication

Page view tracker