Debugging Applications for Microsoft .NET and Microsoft Windows
| 2003-03-12 00:00:00 | | 0 | .NET
In the predecessor volume of Debugging Applications for Microsoft .NET and Microsoft Windows, which dealt with Visual Basic 6, John Robbins broke new ground by codifying the techniques and strategies involved in debugging Microsoft Windows applications. In this tremendously revised and much longer version (in keeping with Microsoft's substantial shift to the .NET architecture), Robbins achieves great progress in making a proper professional discipline out of debugging--and in showing how to design software to keep bugs from appearing in the first place.
The greatest value of Robbins' work is in his treatment of bugs' origins in flawed software design and their later manifestation in faulty coding practice. He explains in great detail, for example, how to use assertions (in concert with error handling) to keep bad data from getting into software modules and causing trouble. This coverage is why your development team should read this book before getting too far down the development path.
If you're already done with your software system and just can't make it work right (and, naturally, the Deadline of Death is looming), this book offers hope as well. Want to write a method that you invoke manually only when the program is at a breakpoint in the debugger? This book shows how. Need lots of details on how to add assembly-language code to your Visual C++ .NET software? You'll find them here. There's a lot of information about how debuggers do their work in general, too. To put it concisely, this book contains a career's worth of information on how to keep bugs to a minimum and track them down when they occur. --David Wall
Topics covered: How to design Microsoft Windows software to minimize design flaws, implement designs with as few software errors as possible, and use diagnostic tools and techniques to squash bugs that make it into your systems. All the latest Visual Studio .NET tools get attention, as do techniques for getting the most out of those tools. Specific coverage goes to strategies for fixing thread deadlock problems, resolving memory troubles, and reading Dr. Watson dumps.
User review
This is great stuff
As the title says, it covers both debugging applications for Windows and .NET. That is alot of ground to cover and the book still manages to get it all in and keep it interesting for what could be a very dry read.
There are some topics missed. For example: not covered are debugging for CE or Windows Mobile, debugging using virtual machines (VMWare extensions for Visual Studio, etc.) or the shared sources available for ASP.NET or Windows CE. These are minor issues in an outstanding book on the subject.
A must have for every professional Windows developer.
User review
Magic
One of the best technical books I ever read.
This book is very enjoyable, well seasoned with humor, and definitely teaching a lot about debugging applications in windows.
I highly recommend this book for anyone who writes C++ code and, like all of us, one day can face an angry customer, after some unexpected crash scenario.
User review
Definitive guide to Windows debugging
I have bought all of John's books. He is the guy Microsoft calls when they can't solve a problem. On top of that he has a great writing style, is easy to understand, and has some great war stories. His books are always the top of my recommended reading list.
User review
A very useful discussion of Windows debugging practices
This book brings a vast amount of Windows-specific debugging information together in one place and has been very helpful to me. Some of this info could be found elsewhere, but only by sorting through dozens of documentation pages and magazine articles, some many years old, and additionally the author adds value by giving very explicit instructions (even providing source code) on how to do things that are often only hinted at in the Microsoft documentation.
Most useful to me were the symbol-server tips, the SuperAssert macro and seeing how it does it what it does, crash handling in general, and the author's insight into why certain things are so slow (like OutputDebugString).
This book does have a not-so-subtle anti-C++ bias, there are little digs at C++ coding techniques throughout the book, which seem a little antiquated and inappropriate in 2005.
In the chapter on the debug C-runtime, I'm really surprised the author does not suggest writing a leak-detection system that captures the callstack at the time of allocation, I've found the C-runtime's file-and-line-oriented leak report fairly useless since the allocation is often deep inside some container class, you really need to know what code caused the allocation, not what code actually did the allocation. And the recommended feature that walks the entire heap every N allocations is unusable (it's too slow) in a large C++ program which might have many thousands of allocations. Also, redefining C++ keywords as suggested seems so evil, there are better ways of doing this.
I believe Windows XP Service Pack 2 changed some Windows internals that affect crash handling/debugging/stack walking, I wouldn't mind seeing an updated volume that covers these changes in detail.
Overall though, an excellent book, the most useful debugging book I've found so far.
User review
Good sequel, hope to see the next one too
I'm writing this to thank that guy who posted the table of contents in an effort to show how this book is the same as John Robbins' prior - since that is what convinced me to buy it :-)
Not just that it costs a lot less then what people ask for a copy of out of print `first edition`, but also seeing the TOC told me that this book made not a small step forward - in particular by ditching that VB thing and opening the doors to windbg -- THE TOOL, if you don't have the money or reason for SoftICE.
Books covering hi-tech need rejuvenation every once in a while and the way John Robbins did it could actually serve as an example on how to do it right.
So, if I see the 3rd sequel this or next year I'm probably going to buy it too - if it gives windbg a 50-50 split with Visual Studio, and a chapter on kd maybe? :-)
As for a `a complete knowledge of the .NET framework debugging` - if you know how to anything under Visual Studio debugger you already know it - say you forget half of what this book is trying to teach you and you are still fine :-). Managed code is so shielded that there's nothing on earth new for debugging - unless you want to dig two levels bellow and go into JIT or PInvoke - in which case you are going to need this book.