Programming Books C Java PHP Python Learn more Browse Programming Books
Advanced Windows Debugging and over one million other books are available for Amazon Kindle. Learn more
  • List Price: $64.99
  • Save: $16.80 (26%)
Only 7 left in stock (more on the way).
Ships from and sold by
Gift-wrap available.
Advanced Windows Debuggin... has been added to your Cart
Condition: :
Access codes and supplements are not guaranteed with used items.
Sell yours for a Gift Card
We'll buy it for $5.74
Learn More
Trade in now
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Advanced Windows Debugging Paperback – November 8, 2007

ISBN-13: 000-0321374460 ISBN-10: 0321374460 Edition: 1st

Buy New
Price: $48.19
21 New from $43.60 23 Used from $14.77
Amazon Price New from Used from
"Please retry"
"Please retry"
$43.60 $14.77
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Spring Books
The Big Books of Spring
See our editors' picks for the books you'll want to read this season, from blockbusters and biographies to new fiction and children's books.
$48.19 FREE Shipping. Only 7 left in stock (more on the way). Ships from and sold by Gift-wrap available.

Frequently Bought Together

Advanced Windows Debugging + Inside Windows Debugging (Developer Reference) + Windows Internals, Part 1 (6th Edition) (Developer Reference)
Price for all three: $104.80

Buy the selected items together

Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 840 pages
  • Publisher: Addison-Wesley Professional; 1 edition (November 8, 2007)
  • Language: English
  • ISBN-10: 0321374460
  • ISBN-13: 978-0321374462
  • Product Dimensions: 7 x 1.1 x 9 inches
  • Shipping Weight: 2.6 pounds (View shipping rates and policies)
  • Average Customer Review: 4.9 out of 5 stars  See all reviews (29 customer reviews)
  • Amazon Best Sellers Rank: #128,102 in Books (See Top 100 in Books)

Editorial Reviews

About the Author

Mario Hewardt is a senior design engineer with Microsoft, and has worked extensively in the Windows system level development area for the last nine years. He is currently involved with designing and implementing the next generation management protocol for Windows Longhorn.


Daniel Pravat is a senior design engineer with Microsoft and has worked in the Windows division, primarily within the Windows management area. He is currently leading a development team that has the responsibility of shipping the most reliable management platform for Windows Longhorn.

Excerpt. © Reprinted by permission. All rights reserved.


Not long ago we, were reminiscing about a really tough problem we faced at work. The Quality Assurance team was running stress tests on our product and every four or five days, a crash would rear its ugly head. Sure, we had debugged the crash as far as we thought possible, and we had done extensive code reviews to try to figure it out, but alas, not enough information could be gained to get to the bottom of it. After several weeks of unfruitful attempts, we started looking for alternative approaches. During a random hallway conversation, someone happened to casually mention a tool called gflags. Having never heard of this tool before, we set out to do some research to find out how it could help us get to the bottom of our crash. Unfortunately, the learning process proved to be somewhat difficult. First, finding information about the tool proved to be a real challenge. There was a ton of great information in the reference documentation that came with the tools, but it was hard to figure out how to actually get started. We quickly realized that without some basic guidance, there was little hope for us to be able to utilize the tool. Naturally, we decided to ask the person who had happened to mention the tool if they knew of any documentation or pointers. They gave us some brief descriptions of the tool and, perhaps more importantly, the names of other people who had worked with the tools extensively. What followed was a series of long and instructive conversations, and bit by bit the basic idea behind the tools started falling into place.

Did we ever get to the bottom of the crash? Yes—we did. As a matter of fact, enabling the correct tool while running our stress tests pinpointed the problem to such accuracy that it only took an hour of code reviewing to locate and fix the misbehaving code. Had we known about this tool and how to use it from the start we would have saved several weeks of work. From that point on, we dedicated quite a lot of time to furthering our understanding of the tools and how they can help while trying to troubleshoot misbehaving code.

Over the years, the Windows debuggers and tools have matured and grown and become increasingly powerful. The amount of timesaving features now available is truly mind-boggling. What is equally mind-boggling is that after several years, the native debuggers and tools are still relatively unknown to developers. The few developers who do find out that these tools exist have to go through a similarly painful learning process as we did years ago. We were fortunate to have the luxury of working with engineers at Microsoft (some of whom wrote the tools), but without this luxury, many hopeful developers end up at a dead end and are never able to reap the benefits of the tools. This unfortunate problem of a lack of learning material also turned out to be a great opportunity for a solution, and thus the idea for this book was born. The key to enable developers to gain the knowledge required is to provide a central repository of concise information that fully explains the ins and outs of the debugging tools and processes. The book you are holding serves as that key and is the net result of three years of writing and over 10 years of collective debugging experience.

We hope that you will enjoy reading this book as much as we enjoyed authoring it and that it will open up the door to a truly amazing world of highly efficient software troubleshooting and debugging. Knowing how to use the tools and techniques described in this book is a critical part of a computer scientist's work and can teach you how to very efficiently troubleshoot some of the toughest problems in software.

Who Is This Book For?

The short answer to this question is anyone who is involved in any facet of software development and has a strong desire to learn what is actually happening deep inside Windows. Although the technical nature of the book might make you believe that its content is only intended for advanced system engineers, this is absolutely not true. One of the key points of this book is the removing of the magic. For various reasons, a lot of software engineers believe that there is a magical relationship between the software they are working on and the operating system. When a problem surfaces that requires the analysis of operating system components (such as RPC/COM or the Windows heap manager), this preconceived notion of magic prevents them from venturing inside Windows to gain more information that can potentially help them solve the problem. To make effective use of this book, you will have to learn how to remove this preconceived notion and truly be of the mind-set that there is no magic behind-the-scenes. The core Windows components should be viewed as an extension of your product and not as a separate and magical layer. After all, its all just code—some of which just happened to be written by other people. If you can adjust your mind-set to accept this, you will have taken your first steps to mastering the art of Windows debugging.

Software Developers

Anyone from a low-level system developer to a high-level RAD developer will benefit from reading this book. Whether your preference is writing Windows-based software in assembly language or by using the .NET framework, there is a ton of useful information to be learned about the tools and techniques behind Windows debugging. Over the years, we've had several discussions with higher level RAD developers who claim that they really don't see the need to learn about these low-level topics. After all, the beauty of writing code at a higher level is that all of the low-level intricacies are abstracted and hidden away from the developer. We couldn't agree more. However, our claim is that although abstractive programming allows the developer not to have to focus on low-level details, it does not negate the need to know how the abstraction really works. The substance behind this claim is simple. What you are working with is really just that—an abstraction. Usage of this abstraction in a design that it was not suited for can cause serious problems in your software; and in such a case without a solid understanding of how the abstraction works, it can mean the difference between shipping your product on time and slipping the release date by several months.

Another key factor when considering mastering the Windows debuggers and tools is related to the debugging of live production servers. While every attempt should be made to fix bugs before shipping a product, we all know that some bugs might slip through the cracks. When these bugs do surface post release, it can be a real headache tracking them down. Customers who encounter the bugs on live production servers are typically very sensitive to downtime and configuration changes, making it impossible to install a complex debugger package. The Debugging Tools for Windows, on the other hand, enables live debugging with no server configuration change and no installation requirements. In short, it enables customers to keep a pristine server during the troubleshooting process.

Quality Assurance Engineers

Just as software developers will find the information in this book useful in their day-to-day tasks, so will Quality Assurance engineers. Quality Assurance typically runs a battery of tests on any given component being tested. During this time, any number of bugs can surface. Whether they are memory corruptions, resource leaks, or hangs, knowing what extended instrumentation to enable during the test run can dramatically reduce the time it takes for root cause analysis. For instance, imagine that quality assurance is tasked with stress testing a credit card authorization service. One of the goals is that the service must be capable of surviving one week of continuous and simultaneous hammering by client requests. On day six, the service starts reporting errors for all client requests. At this point, the developers responsible for the service are called in to analyze the problem. It doesn't take long for them to figure out that the server has run out of memory, presumably due to a small memory leak that accumulates over time. After six days of accumulated leaks, figuring out the source of the leak, however, is a much bigger challenge that can take days of debugging and code reviewing. Had the correct extended instrumentation been enabled while running these tests, the time it would have taken to analyze the leak could have been greatly reduced.

Product Support Engineers

In much the same way as Quality Assurance uses the Windows debuggers and tools to make root cause analysis more efficient, so can the product support engineers. Product support faces many of the same problems that quality assurance and software developers face on a day by day basis. The key difference, however, is the environmental constraints that they work under. The constraints can include not having full access to the server exhibiting the problems, having a limited amount of time available for troubleshooting the server, having limited access to customer source code, and other issues.

The information presented in this book will give product support engineers a great deal of ammunition when tackling these tough problems. Knowing how to debug customer problems with minimal downtime and minimal system configuration changes enables product support engineers to much more efficiently and non-intrusively gather the required data to get to the bottom of the problem.

Where There Is a Will, There Is a Way

It should come as no surprise that the material presented in this book is highly technical in nature. We are not going to try and convince you that you don't need to know anything about Windows internals to benefit from the book because the simple truth is that you do. As with any technically oriented book, a certain amount of knowledge is assumed.

Curiosity and a Will to Learn

While writing this book, we came to the realization that some of the areas of Windows we were writin...

Customer Reviews

4.9 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 29 customer reviews
A very good hands on book with many gems of knowledge.
Niclas Lindgren
This book however shows that even experts can gain a new level of debugging tips and tricks.
Ir A. B. Cohen Stuart
This is hands down the best book I have ever seen on the topic of Windows debugging.
Hugh K. Boyd

Most Helpful Customer Reviews

20 of 22 people found the following review helpful By Gary McNickle on December 23, 2007
Format: Paperback Verified Purchase
As a technical supervisor, one of the biggest problems I have is training our development teams in the use of the various debugging tools available. I purchased a copy of this book hoping it would help me in that training, and I was not disappointed.

This book goes far beyond my expectations and provides insight into not only the use of the various debuggers, explaining how to set breakpoints and analyze memory locations, but it also goes into detail on how to debug some of the more insidious problems common to developers.

The chapters on thread synchronization and stack and heap corruptions are excellent and provide invaluable insight into debugging these common problems. But more than that, the book outlines and gives instructions on using some of the lesser known debugging aids, such as the application verifier and the leak diagnosis tool, as well as writing your own debugger extensions.

There is a chapter on post-mortem debugging, which goes into detail on using crash dump files, instructions on obtaining information from the Windows reporting service and a chapter on managing symbol and source files.

Finally, there are chapters on debugging Vista applications, security problems, and interprocess communications.

The authors are clearly masters of debugging windows applications, and this book stands alone in the field.

I am a senior C++ engineer with over ten years of experience writing applications for windows and linux, and I found new information in every chapter, all of it easy to understand and well written.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
12 of 13 people found the following review helpful By Dennis L. Hughes on August 7, 2008
Format: Paperback Verified Purchase
I have little to add to the effusive praise of previous reviewers. This is a one-of-kind book. An instant classic.

Beware, however. As others have noted, this is definitely an _advanced_ book. If you're not comfortable with arcane command syntax, bits and bytes, and such this will be painful to incomprehensible for you. On the other hand, I dare say you will never be a true Master Debugger until you have a good grasp of this material.

You would do well to start with Debugging Microsoft .NET 2.0 Applications or the now-unavailable Debugging Applications for Microsoft .NET and Microsoft Windows. Both will give you an easier introduction to WinDbg. The latter, older volume has much more information on native code debugging than the newer version. As they also cover the Visual Studio debugger in detail, most developers need go no further than one of these.

Note that WinDbg _can_ be used with SOS and ADPlus to do some pretty fancy .NET debugging that isn't possible with Visual Studio alone. For that matter, the .NET CLR on Windows is implemented using the same Windows API as any native application. I've seen WinDbg used to trace bugs through C# application code down to find that the defect was actually in the CLR or Windows itself. John Robbins (author of the previously mentioned books) states in Chapter 6 of the latest version that "in our consulting work at Wintellect, which as you know works on the toughest bugs, we use WinDBG nearly 70 percent of the time.
Read more ›
1 Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
7 of 8 people found the following review helpful By Ir A. B. Cohen Stuart on December 11, 2007
Format: Paperback
I've been using the Windows Debuggers for a long time now and I found myself an expert and I am regarded as such at my working place where I actively push the use of windbg and friends for trouble solving.
This book however shows that even experts can gain a new level of debugging tips and tricks.
This is not a one of many books on this topic but one that stands out with head and shoulders.
A definately must have for those who do serious debug work, both on kernel and user level debugging!
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
Format: Paperback Verified Purchase
This is the book I wanted to read when I started doing Windows crash dump analysis more than 5 years ago. Although other excellent Windows debugging books existed at that time including "Debugging Applications" written by John Robbins and "Debugging Windows Programs: Strategies, Tools, and Techniques for Visual C++ Programmers" written by Everett N. McKay and Mike Woodring I needed a book that discusses debugging in the context of WinDbg and other tools from Debugging Tools for Windows package. So I had to learn from day-to-day experience and WinDbg help. Now WinDbg is a de facto standard in debugging and troubleshooting on Windows platforms and the book comes at the right time to teach the best practices and techniques. I'm reading it sequentially and I'm on the page 387 at the moment and I have already learnt techniques and debugging strategies I missed due to certain habits in using WinDbg. See my real time reading notes on Software Generalist blog. Even if you do mostly memory dump analysis and not live debugging of your product, you also will learn a lot to apply in your day-to-day problem identification and troubleshooting. Absolutely must have for any Windows software engineers, escalation engineers and technical support engineers willing to advance their debugging skills.

Dmitry Vostokov
Founder of DumpAnalysis Portal
Editor-in-Chief of Debugged! MZ/PE magazine
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews

More About the Authors

Discover books, learn about writers, read author blogs, and more.

What Other Items Do Customers Buy After Viewing This Item?

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
Advanced Windows Debugging
This item: Advanced Windows Debugging
Price: $64.99 $48.19
Ships from and sold by