MSDN Documentation

Microsoft Developer Network | Tools for Windows Development

Windows Debuggers

This section provides comprehensive documentation and resources for debugging Windows applications and system components. Effective debugging is crucial for identifying and resolving issues, improving performance, and ensuring the stability of your software.

Introduction to Debugging

Debugging is the process of finding and resolving defects or problems within a computer program that prevent correct operation. Windows offers a powerful suite of debugging tools designed for various scenarios, from kernel-mode debugging of the operating system itself to user-mode debugging of applications.

WinDbg

WinDbg is a highly capable debugger for Windows. It supports both user-mode and kernel-mode debugging. It is part of the Debugging Tools for Windows package.

Key Features

Installation

WinDbg is available as part of the Windows SDK. You can download the latest Windows SDK from the official Microsoft website. Ensure you select the "Debugging Tools for Windows" component during installation.

Getting Started

Launch WinDbg and choose the appropriate debugging scenario:

Tip: Understanding symbol paths is crucial for effective debugging. Ensure your symbol path is correctly configured to include Microsoft's public symbol servers.

CDB (Console Debugger)

CDB is a command-line debugger that offers much of the same functionality as WinDbg but without a graphical interface. It's ideal for automated debugging tasks and scripting.

Key Features

Usage

You can launch CDB from the command prompt:

cdb -attach 

Or to debug an application:

cdb -o 

NTSD (NT Services Debugger)

NTSD is a command-line debugger specifically designed for debugging services running on Windows. It allows you to attach to services and debug them as if they were regular user-mode applications.

Key Features

Usage

You can start a service under NTSD's control:

ntsd -d 

Visual Studio Debugger

The Visual Studio IDE includes a powerful and integrated debugger that is widely used for developing Windows applications. It offers a rich graphical interface for setting breakpoints, inspecting variables, stepping through code, and analyzing program flow.

Key Features

Integration

The Visual Studio debugger seamlessly integrates with the development workflow, allowing you to debug applications directly from the IDE. It can also attach to running processes.

Core Debugging Concepts

Advanced Debugging Topics

Explore the links in the navigation pane for more detailed information on each debugger and advanced debugging techniques.