• RRP: £27.99
  • You Save: £25.00 (89%)
FREE Delivery in the UK on orders with at least £10 of books.
Only 2 left in stock (more on the way).
Dispatched from and sold by Amazon.
Gift-wrap available.
Debugging Windows Program... has been added to your Basket
Trade in your item
Get a £0.50
Gift Card.
Have one to sell?
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

Debugging Windows Programs: Strategies, Tools and Techniques for Visual C++ Programmers (DevelopMentor) Paperback – 18 Aug 2000

3 customer reviews

See all formats and editions Hide other formats and editions
Amazon Price New from Used from
"Please retry"
£2.99 £3.36
£2.99 FREE Delivery in the UK on orders with at least £10 of books. Only 2 left in stock (more on the way). Dispatched from and sold by Amazon. Gift-wrap available.

Trade In this Item for up to £0.50
Trade in Debugging Windows Programs: Strategies, Tools and Techniques for Visual C++ Programmers (DevelopMentor) for an Amazon Gift Card of up to £0.50, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Product details

  • Paperback: 592 pages
  • Publisher: Addison Wesley; 1 edition (18 Aug. 2000)
  • Language: English
  • ISBN-10: 020170238X
  • ISBN-13: 978-0201702385
  • Product Dimensions: 18.5 x 3.3 x 22.9 cm
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Bestsellers Rank: 1,452,140 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Discover books, learn about writers, and more.

Product Description

Amazon Review

Debugging Windows Programs sounds like it might focus on using a debugger exclusively, but this book is actually a wide-ranging tour of how to write better, more robust C++ code that can be more easily debugged. Mixing plenty of nuts-and-bolts tips with higher-level strategies for effective testing, Debugging offers plenty of valuable expertise for any working C++ programmer.

The focus is on providing practical tips for more successful debugging, but many of the suggestions are for tweaking the way you write C++ code. Early sections examine how to take full advantage of assert statements (whether in C, MFC, or custom functions), which can be used to write safer code; trace statements, which are used to log debug messages, are also covered. There are also numerous tips about C++ style, along with the debugging dos and don'ts of working with errors, exceptions, COM objects and threads.

Chances are, even if you are an experienced C++ programmer, you will learn something useful about how to get more out of the Visual C++ debugger from the last sections of this book. From the right compiler and linker switches to how to customise watch variables by tweaking the configuration files in Visual C++, you will learn how to be more productive with this tool. The text concludes with another useful section, a FAQ-style listing of dozens of common debugging questions and answers.

Though highly practical, the book also recommends thinking about your code, applying strategies for each aspect of debugging features consistently and effectively. The bottom line is that you will not only find bugs in present code, but you will also design code that is easier to test and debug in the future. In all, Debugging Windows Programs delivers a good mix of practical tips and strategies that will help C++ programmers create more robust (and testable) code. --Richard Dragan

From the Back Cover

For professional software developers, debugging is a way of life. This book is the definitive guide to Windows debugging, providing developers with the strategies and techniques they need to fulfill one of their most important responsibilities efficiently and effectively.

Debugging Windows Programs shows readers how to prevent bugs by taking full advantage of the Visual C++ development tools and writing code in a way that makes certain types of bugs impossible. They also will learn how to reveal bugs with debugging statements that force bugs to expose themselves when the program is executed, and how to make the most of debugging tools and features available in Windows, Visual C++, MFC, and ATL. The authors provide specific solutions to the most common debugging problems, including memory corruption, resource leaks, stack problems, release build problems, finding crash locations, and multithreading problems.

These essential topics are covered:

  • The debugging process
  • Writing C++ code for debugging
  • Strategically using assertions, trace statements, and exceptions
  • Windows postmortem debugging using Dr. Watson and MAP files
  • Using the Visual C++ debugger
  • Debugging memory
  • Debugging multithreaded programs
  • Debugging COM

Each chapter provides developers with exactly what they need to master the subject and improve development productivity and software quality.

Comprehensive, current, and practical, Debugging Windows Programs helps developers understand the debugging process and make the most of the Visual C++ debugging tools.


Customer Reviews

5.0 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 3 customer reviews
Share your thoughts with other customers

Most Helpful Customer Reviews

3 of 3 people found the following review helpful By Mr on 5 Dec. 2000
Format: Paperback Verified Purchase
Finally, a book that gets down to the practical aspects of how to find, and more importantly prevent, bugs in Windows software. It has a similar feel in some places to Steve McConnell's 'Code Complete' because of the pertinent illustrations of programming concepts with code but because of it's highly focussed approach to the Visual C++ environment offers a very high 'bang-for-buck'.
The highly specific nature of the information in the book could be considered a flaw but I do not believe that this is the case. As a consultant, I find that one of the most common problems that I face, when mentoring a client's junior staff, is that they have often been sent on introductory programming VC++ courses and are then put straight onto a live project. The inevitable time constraints on these courses do not allow the lecturer to teach defensive techniques or even the range of debugging tools that are built in to the Visual C++ environment.
Within this book is enough breadth to explain the most common problems (heap allocation, use of pointers, Windows structured exceptions) and depth for the more complex problems (register contents, multithreading and debugging COM). There is also a good dollop on programming lore and wisdom to help you keep your head when debugging an intractable problem.
I have had this book for just about a month now and it has only spent a couple of days on my desk. If you are a Visual C++ developer, this book should be on your reading list.
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
2 of 2 people found the following review helpful By A Customer on 21 Sept. 2001
Format: Paperback
An extremely readable book, full of useful tips. The only thing I'd improve is the indexing as getting back to a piece of information can take a while.
I dipped into this book at C6 and realized I'd spent the entire day reading it. Tips about undocumented features like how to avoid stepping into implicit CString contructors in function parameters and using the /MAP & /OPT linker options have been worth the price of the book alone.
I can say that reading it has improved both our development and productization cycles. If you're serious about shipping quality C++ based products, this book is an essential.
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 book contains most of the things that you need to know about Debugging windows program. I just loved reading this book, its to the point and does not wastes time on giving you basic information.

This is the must book you should have if you find your self often breaking your head against memory dumps.
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 Helpful Customer Reviews on Amazon.com (beta)

Amazon.com: 13 reviews
16 of 16 people found the following review helpful
"must have" for general debugging 8 April 2002
By developer - Published on Amazon.com
Format: Paperback
In my experience, programmers fall into two categories: general (majority) and advanced (few); advanced ones understanding register and stack dumps etc, general ones being lost. This book covers the more general programmer, Robbins book the advanced. Comparing the two, you could write your own debugger and your own "core" dumps (which you can then examine) from Robbins book; with this one you can't, but it covers useful stuff missing from Robbins book (eg. PE format, address space partitioning). As such they have some overlap but supplement each other. Both books are essential to serious developers. I have one gripe with this and Robbins book: neither suggests outputting the mixed source/assembly/machine_code (.COD files); these are essential (without a .PDB) if a crash occurs so that the offending instruction etc. can be found, as many instructions usually follow a line of source; secondly, function locals only show in .CODs (as offsets from EBP) so making them easy to locate on a stack trace.
12 of 12 people found the following review helpful
Bugs? My codes only have features... 5 Sept. 2000
By Min Kim - Published on Amazon.com
Format: Paperback
This book should have been included with the MS Visual C++ documentation. If you can say "My code doesn't have bugs, only features," then you may skip this book. I found this book full of tips and tricks and secrets of visual c++ debugging. Just by having this book on your side, you will save hours and hours of frustration trying to find that one line that's keeping you from going home.
Beginning few chapters are basic debugging knowledge every visual C++ programmers should be aware of. It explains more of 'preventive' programming styles so that you notice your bugs before your customers. Various topics including assert and compiler options are well explained, much better than the ones you would find in the vc++ documentation.
I was happy to finally see some explanation on Dr. Watson messages. In Chapter 6: Debugging with Windows, Woodring and McKay explains all the precious information buried in those memory dumps that we often ignore. After all, all those hexadecimal numbers got to mean something, right?
If you have been always unsure about your multithread knowledge, this book contains a good section on multithread programming issues and how to monitor your threads from the debugger.
And for those who can't sleep at night because of some odd bug buried in thousands of lines of code, I recommend jumping right into Chapter 12: Desperate Measures. You are probably too frustrated to think straight now. Let this book help you calm down and look through your code step by step. This chapter simply provides a code checking checklist that you should probably copy down and tape it to your monitor.
For those of you that are starting a fresh batch of code and thinking about buying this book, my recommendation is to read this book first, then code. You'll be a lot happier later. And for those of you that have already written a few million lines of code and trying to debug, you can apply some of the techniques found in this book to build up confidence in your code. I suppose if you live dangerously ("Just let 'er rip and hope for the best"), then most of the things explained in this book will only seem annoying to you, but I'm sure most of you programmers out there would like to know a few neat debugging tricks to show off in front of your co-workers.
10 of 10 people found the following review helpful
An invaluable book � packed with immediately useful macros 23 Sept. 2000
By Andrew Coats - Published on Amazon.com
Format: Paperback
The vast majority of recommendations are so simple, yet so effective. Even if you only read random sections of this book, it will be of immediate benefit. This book in conjunction with John Robbin's book (Debugging Applications) are invaluable in not just giving you tips on how to find bugs but much more importantly how to code defensively to reduce the chances of bugs occurring in the first place.
As the authors mention in the preface, they are not many original ideas in the book - but it is a good consolation of publicly available information. The book adds value by explaining when to use certain techniques and when to use others e.g. Chapter 5 -Using exceptions vs. return values.
Because the book is specifically geared to C++ programmers there are some fantastic macros. For instance _CoCreateServer which wraps CoCreateInstance but gives detailed error information if anything goes wrong. Chapter 9 - Debugging Memory was particularly useful. Being able to detect leaking memory in ATL components (just like MFC does) was worth the price of the book alone.
My only criticism is the use of the Arial font which makes the book a little getting used to seeing on the printed page.
9 of 9 people found the following review helpful
Rich with Information and Well Written 29 April 2001
By Ivan S Salgo MD - Published on Amazon.com
Format: Paperback
Writing versatile C++ is serious business. Moreover, the added complexity of Win32, MFC and ATL make debugging a challenging task. Simple techniques such as use of TRACE() statements and Watch facilities alleviates minor problems. While there are several authoritative texts on C++ and VC++, the same cannot be said for debugging techniques. This book rounds out the library of serious VC++ developers nicely. It is an absolutely amazing text. It's scholarly yet approachable. Moreover, as someone with an extensive library (including C++ and Win32 etc.), I can attest that there is nonetheless "new" information presented to me that is quite useful. The beginning of the text addresses philosophical issues in helping prevent bugs. The next section gives great guidance in actually using the debug facilities of Visual Studio most thoroughly. The last section covers issues specific to COM and multithreading. This text has a wealth of useful information. There is a good introduction to the Intel instruction set and use of MAP files for postmortem debugging. (I wish there were a text of the same caliber that covers use of and debugging Intel's MMX.) This book will definitely help users (beginner or expert) achieve a higher plane(42).
4 of 4 people found the following review helpful
No Mercy Debugging 27 July 2001
By Elijah D - Published on Amazon.com
Format: Paperback
C++ bugs can be very difficult to find and can bring tears to the eyes of a programmer easily.(You know the bug is there but you just cant find it to save your life!)
After reading the first few chapters of this book, I knew it was a winner.This book shows ways to find bugs in different kinds of C++ programs MFC,COM etc.
The most important however is the chapter on memory bugs(a real pain)
If you need to hunt down bugs, get this book and your monitor is less likely to end up smashed from your frustrations.
This book also points the reader to a lot of other books which should make a better programmer of anyone who bothers to buy them.
Were these reviews helpful? Let us know