Through a combination of best practices and common debugging and programming techniques—several of which are not currently documented in other books—this book shows developers why the system works the way it does and not simply what it does or how it does it.During the course of this book, readers Learn how to use debuggers as an integral part of the development process iterations Leverage the power of debuggers to learn system internals and mechanics Dissect software behavior on Windows using tracing and debugging tools Apply the above strategies to enhance knowledge of a few key fundamental topics in Windows. Use Windows debuggers throughout the development cycle—and build better software Rethink your use of Windows debugging and tracing tools—and learn how to make them a key part of test-driven software development. Led by a member of the Windows Fundamentals Team at Microsoft, you'll apply expert debugging and tracing techniques—and sharpen your C++ and C# code analysis skills—through practical examples and common scenarios. Learn why experienced developers use debuggers in every step of the development process, and not just when bugs appear. Discover how to: Go behind the scenes to examine how powerful Windows debuggers work Catch bugs early in the development cycle with static and runtime analysis tools Gain practical strategies to tackle the most common code defects Apply expert tricks to handle user-mode and kernel-mode debugging tasks Implement postmortem techniques such as JIT and dump debugging Debug the concurrency and security aspects of your software Use debuggers to analyze interactions between your code and the operating system Analyze software behavior with Xperf and the Event Tracing for Windows (ETW) framework Cover Contents at Glance Contents Foreword Introduction Part 1 - A Bit of Background 1 - Software Development in Windows Part 2 - Debugging for Fun and Profit 2 - Getting Started 3 - How Windows Debuggers Work 4 - Postmorten Debugging 5 - Beyond the Basics 6 - Code Analysis Tools 7 - Expert Debugging Tricks 8 - Common Debugging Scenarios - 1 9 - Common Debugging Scenarios - 2 10 - Debugging System Internals Part 3 - Observing and Analyzing Software Behavior 11 - Introducing Xperf 12 - Inside ETW 13 - Common Tracing Scenarios Appendix A - WinDbg User-Mode Debugging Quick Start Appendix B - WinDbg Kernel-Mode Debugging Quick Start Index Software development in Windows Getting started How Windows debuggers work Postmortem debugging Beyond the basics Code analysis tools Expert debugging tricks Common debugging scenarios, part 1 Common debugging scenarios, part 2 Debugging system internals Introducing Xperf Inside ETW Common tracing scenarios WinDbg user-mode debugging quick start WinDbg kernel-mode debugging quick start. During the course of this book, readers will: * Learn how to use debuggers as an integral part of the development process iterations * Leverage the power of debuggers to learn system internals and mechanics * Dissect software behavior on Windows using tracing and debugging tools