Geeks With Blogs

Jeff Julian's Blog CEO of Enterprise Marketer

AdvancedNETDebugging.jpgWe I first received this book, I was not sure what to expect.  When it comes to development topics on debugging the spectrum is very wide.  Most developers, including myself, only use basic techniques for day-to-day debugging. These get us through our problems quickly and they work well for 80% of the bugs we encounter.  We forgot to close a connection, we didn't set a variable, we forgot to exit a loop, we fat fingered a variable name.  All of these are daily errors we as developers face and fix with ease inside Visual Studio.  The team in Redmond has done an awesome job at making our job easier for these tasks.

However, there are some bugs that are just hard to find.  There are some bugs that are not ours and we have no influence over the correction, but we must know they exist and why so that we can reroute our logic to not run into them when possible.  In today's developer economy, more and more is done by larger firms that just can not be moved quickly for repair unless you have the power and clout to make them move.  We wait for a patch or sometimes the next version for these things to be fixed.  These bugs and others that are more difficult to find and require much smarter tools that Response.Write/Console.Write, breakpoints, Stack Traces, or F10/F11 walkthrough to find.  They require SDKs and obscure searches on to find these tools.  They are not the most friendly when it comes to UI's and some were just behind-the-scenes projects that make our lives easier from those who work at Microsoft.  This book plays in this territory.

Flip open the cover of this book and you will find names that you know and titles that you wish you had writing praises about the author and his book.  Most of these names come from Microsoft Corporation, so you get a sense of comfort knowing that "if they liked it, then I probably should too".  A very cool feature of this book was a List of Code Listings, a ToC of code examples which quickly turns this book into a reference guide as well as a sit down and read book.  I think other technical books could learn from this.  Some people buy books to read, other buy books for reference, I think all dev books could use a list like this to fit in both spectrums.

The book does well at going into the details of the topics covered.  I was refreshed when going through the CLR fundamentals chapter after years since reading about how the CLR worked.  It didn't take long to have my passions arise about .NET from 2001 and 2002 when I couldn't get enough information about this new product that would change development (and it did).  I also learned a lot more that I didn't know about the stack as well through this, how the Windows Loader works with files and loading .NET assemblies.  Not something you deal with daily, but still interesting to know and helpful when you are looking into how it all works.

Once you dive through the introduction and layout outline of the book, you get right into the different tools for debugging.  Some of them you know, some of them you wish you had known about before.  Reading this chapter causes you to want to read more because there is something on this list the average developer wants to know more about.  The next chapters are pretty deep and I would not suggest reading it if operating heavy machinery or driving a car.  Definitely good stuff, but not for the faint of heart.

Chapter 3 may make you feel a little off when you read the title "BASIC DEBUGGING TASKS" and yet the information cover is not basic as all to the typical developer who does not debug at this level.  This is an advanced book so the title should read "BASIC DEBUGGING TASKS FOR ADVANCED .NET DEBUGGING".  Reading it this way will help create a level of comfort with the book.  The topics discussed in this chapter set the stage for the remainder of the book so it is important to review and understand before moving on.  This chapter concludes the Overview section of the book.

The next section of the book is Applied Debugging.  This is where the author covers the specific types of debugging problems you face.  The Assembly Loader, Managed Heap and Garbage Collection, Synchronization issues, and Interoperability.  Though I didn't read these chapters with much detail, they contain a wealth of information I and I will be using this book when I run into issues now instead of trying to use the basic tools for daily debugging.  The author truly shows his wealth of knowledge in this section.

The final section of this book covers "Advanced Topics" which is not as scary as it sounds.  Postmortem Debugging (Dump Files and Windows Error Reporting) as covered in detail in Chapter 8, Power Tools in Chapter 9, and topics specific to CLR 4.0 in Chapter 10.

I enjoyed reading the chapter on Windows Error Reporting, cause I have always wondered when an obscure application crashes, does the vendor get this information or is it just for Microsoft to see how the applications are working with Windows.  The author does a great job detailing out the enrollment process and showing you how to get those dumb files that were submitted.  I will be looking into this for a current project I am on for use by the client.

Power Tools is your deep breath chapter.  The author has done a great job up to this point of doing a brain dump on how to debug application dumps and you will feel a little bit like telling the author "TMI man!"  But the Power Tools chapter shows you how you can interact with these debugging tools in your native developer environment better.  Visual Studio integrations and topics covering the CLR Profiler are a must read for those going through this book.

The last chapter covers all the differences between CLR debugging in 3.x to 4.0 that have changed.  It is a very short chapter, but important if you are moving to .NET 4.0 and are learning the differences.  I really liked seeing this as a separate chapter instead of intermixed with the rest of the book since not every project is on the latest platform.


This book has definitely earned a spot on my bookshelf and will be suggested to other developers who are struggling with debugging topics.  All developers owe it to themselves to at least review some of these tools for debugging their applications.  This book is the High Dive at the pool however and a counterpart to the Low Dive should be written.  .NET and Visual Studio have allowed us as developers to get through our days without the need of a book like this, however when the Red Lights are flashing and you have to get down and dirty with a bug, this should be used by someone on your team as a flashlight to help become familiar with techniques for digging deeper.

Technorati Tags: , ,

Posted on Tuesday, November 2, 2010 12:36 AM .NET | Back to top

Comments on this post: Book Review | Advanced .NET Debugging (Addison Wesley) by Mario Hewardt

# re: Book Review | Advanced .NET Debugging (Addison Wesley) by Mario Hewardt
Requesting Gravatar...
I absolutely love this book. It's almost like a developer FAQ in a way. It answers about 90% of the tough questions I don't know the answers to and it's great to always have around the office for younger employees.
Left by Josh on Sep 12, 2011 2:31 AM

Your comment:
 (will show your gravatar)

Copyright © Jeff Julian | Powered by: