Debugging Applications for Microsoft .NET and Microsoft Windows

Book review by Don Kiely.

Don Kiely

October 30, 2009

4 Min Read
ITPro Today logo in a gray background | ITPro Today

PRObooks

 

Debugging Applications for Microsoft .NET and MicrosoftWindows

 

By Don Kiely

 

Bugs are the bane of the software industry. Although.NET s CLR has some wonderful built-in features that make applications morereliable and resilient to the imperfections we usually inadvertently buildinto them, we can still write buggy code. So much of a developer s time in anyreasonably complex software project is spent tracking down the little suckers,either in code written just this morning or regrettably and to the detrimentof our prospects for continued employment in an app that choked after beingdeployed to 1,000 desktops.

 

Debugging is one of those skills that is rarely taught inany kind of formal or informal software development training. It seems theunderlying idea is if you re skilled enough, bugs won t slip into yoursoftware. This might be true for the handful of super-programmers that walkunseen among us. But even for such software gods, every so often they mustdebug someone else s code. So debugging is a skill necessary to a developer ssuccess, yet it is largely self-taught, driven by random bugs and performedthrough home-grown tricks.

 

That s why I was thrilled that John Robbins finallyfinished the updated edition of his book DebuggingApplications that has been long out of print. The new edition Debugging Applications for Microsoft .NETand Microsoft Windows (Microsoft Press) already has become one book Iwouldn t consider doing Windows development without. This book helps you findand squash bugs faster using all the tools in .NET and Windows, gives you manytools the author has developed for analyzing applications, and gains for you adeep and broad understanding of bugs and how to avoid them for robust code all this while making you far sexier to existing or potential employers.

 

If you re expecting a simple rehash of how to use thedebugger in VS .NET to step through your code, think again. Instead, the bookdelves deep into the guts of applications and Windows to figure out exactlywhat is going on. There are even incredibly clever techniques to using the VS.NET debugger that I had no idea existed and are not documented.

 

The book starts with part 1, The Gestalt of Debugging,which discusses the whole debugging experience with lots of practical adviceabout how to approach the task. By the end of part 2, Power Debugging, I wasflabbergasted by the number of existing tools sitting on my development machinealready and Robbins techniques that help zero in on software problems. Thissection covers Windows, .NET, and native code debugging, and Robbins providesplenty of nice tools and utilities to augment those from Microsoft. Theremaining two parts of the book are Power Tools and Techniques for .NET, andNative Code.

 

One of the book s many gems is chapter 10, ManagedException Monitoring. With a couple of years of building applications under mybelt, I thought I had a pretty good handle on exceptions in .NET not evenclose! There are lots of exceptions that fire and are hidden by other code both .NET Framework code and your custom code that hurt performance anddiminish your code s reliability. In this chapter, Robbins covers the ProfilingAPI provided with the .NET Framework SDK. You might not know about this APIbecause it isn t documented in MSDN Help. Instead, you find the Word file onyour drive (Profiling.doc), which has all the information. The API does waymore than profiling, and Robbins uses it to develop an ExceptionMon utilitythat makes monitoring exceptions a snap far better than setting VS .NET tobreak on every exception raised.

 

Much of the code for the book s utilities is written inC++ and included on the CD-ROM. But whether you code in C++, C#, or VB .NET,the book has plenty of information and tools to help you.

 

Be forewarned, however, that this book isn t for beginningcoders, and not every section will be of interest to everyone. But theknowledge is crucial for anyone developing software that becomes increasinglycomplex all the time. I don t often gush like this about books certainly notsoftware books but this one will make a difference.

 

Rating:

DebuggingApplications for Microsoft .NET and Microsoft Windows

By John Robbins

Microsoft Press

ISBN: 0-7356-1536-5

 

Don Kiely is seniortechnology consultant for Information Insights, a business and technologyconsultancy in Fairbanks, Alaska. E-mail him at mailto:[email protected].

 

 

 

Read more about:

Microsoft
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like