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.