Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Debug Diagnostics Tool v2.0 is now available


View products that this article applies to.

More Information

The DebugDiag tool is designed to assist in troubleshooting issues such as hangs, slow performance, memory leaks or memory fragmentation, and crashes in any user-mode process. The tool includes built-in Analysis Rules focused on Internet Information Services (IIS) applications, web data access components, COM+ and related Microsoft technologies, Sharepoint, and .NET. It provides an extensible object model in the form of COM objects and provides a .NET analysis Engine Host with a built-in reporting framework and a Script Host engine for collection.    

The tool is composed of the following two major components

Collection Module:
  • Debugging service: dbgsvc.exe
  • Debugger Host: dbghost.exe
  • User Interface: Debugdiag.Collection.exe

Analysis Module:
  • Analysis Engine: dbglib.dll - DebugDiag.DotNet.dll
  • Analysis UI: Debugdiag.Analysis.exe
  • Rule Builder: DebugDiag.RuleBuilder.exe

In addition to that, DebugDiag 2.0 ships a number of built-in analysis rules and a number of analysis rules samples (In C# and in XAML Workflow) along with a rich Help system.


Instructions for Usage

Collection: Generating Memory Dumps.

When using DebugDiag, you need to first identify what kind of issue you are troubleshooting (e.g. a crash, hang, slow performance, or memory and handle usage). This step will aid in configuring the tool appropriately to get the right data, and therefore identifying the root cause of the problem and resolving it.

Process Crashes

A process crash is usually indicative of an unhandled exception occurring in a process or code running in a process that actively terminates the process. To debug a process crash, start by creating a crash rule against the process(s) in question. Similar to previous debuggers, DebugDiag will attach to a specific process(es) and will monitor the process for one or more types of exceptions or any custom breakpoints that cause the process(es) to terminate unexpectedly. When the crash occurs, a full memory dump file will be created, in the directory specified when setting up the crash rule.

Process Hangs or Slow Performance

To debug a process hang, or slow performance use one of the following:
  1. Create a performance rule. The performance rule could be based on Performance Counters or HTTP Response Times. This latter is specific to web servers or HTTP-based web services. The Performance Counters rule allows you to capture a series of consecutive userdumps when one or more Performance Counters exceed specified thresholds. The HTTP Response Times rule allows you to either use ETW (specific to IIS web server) or WinHTTP (to ‘ping’ any type of web server or HTTP-based web service) to capture userdumps when the configured timeout is reached. 
  2. Create a manual memory dump series during the slow or hang state by right-clicking the process name in the processes view and choosing the "Create Dump Series" option.

Then, analyze the resulting .dmp files with CrashHangAnalysis.asp and/or PerfAnalysis.asp (see below).

Memory or Handle Usage

To debug memory and handle usage, use one of the following:

  1. Create a leak rule against the process in question. The leak monitoring feature will track memory allocations inside the process. Tracking is implemented by injecting a DLL (leaktrack.dll) into the specified process and monitoring memory allocations over time. When configuring a memory and handle leak rule, you can specify memory dump generation based on time or memory usage. 
  2. Using the "processes" view, right-click the process in question and select the "monitor for leaks" option. When the process has grown to the suspected problem size, manually dump the process by right-clicking on the same process in the processes view and choosing the “Create Full Userdump” option. 

Analysis: Analyzing Memory Dumps.

One of the most powerful features of DebugDiag is the ability to analyze memory dumps and generate a report file showing the analysis, along with recommendations to resolve identified problems.

Debugdiag 2.0 introduces a new analysis engine to perform memory dump analysis. Unlike the previous versions that relied on ASP scripting to access memory dump data, the new 2.0 version made available a new engine that is now accessed using .NET. In addition to developing Analysis Rules using .NET, the new Analysis Engine supports also developing Analysis Rules using Workflow 4.0.

DebugDiag 2.0 uses “Analysis Rules” as opposed to "Analysis Scripts" in previous versions. These new rules were converted to .NET from previous Analysis Scripts. There are 5 Analysis Rules shipped with DebugDiag2.0: They are all built into the assembly "DebugDiag.AnalysisRules.exe"

Category Rule Name Description
Crash/Hang Analyzers CrashHangAnalysis Crash and Hang Analysis with specific reporting for ASP, .net, WCF, IIS and more
Memory Pressure Analyzers DotNetMemoryAnalysis  Managed Memory Analysis (Beta version)
Memory Pressure Analyzers MemoryAnalysis  Memory Analysis including Leaktrack and heap info reporting
Performance Analyzers PerfAnalysis  Performance analysis for multiple consecutive dumps of the same process
Crash/Hang AnalyzersSharePointAnalysis  Crash and Hang Analysis with specific reporting for SharePoint


Additional Information

New Features in 2.0

DebugDiag2.0 comes with rich new features and full compatibility with x86 and x64 versions of Windows Vista, Windows 7, Windows 2008, 2008R2 and Windows 8. To install DebugDiag2.0 on x64 systems, you have to install the x64 version of the tool; this version has the built-in x86 support to debug/analyze x86 processes.  Debugdiag 2.0 contains two separates and independents components: Collection module and Analysis module. The collection module is the base module and gets installed by default, while the analysis module id offered as a setup choice.   Below is a summary of the new features added into the 2.0 release:

Analysis:
  • In-Proc Analysis Host
    The old analysis host dbghost.exe is converted to dbglib.dll to improve performance
  • .NET 4.5 support
  • Custom Analysis Rules in .NET
    The old analysis engine is now converted to .NET to allow for analysis rule development in .NET
  • CLRMD Integration
    The Microsoft.Diagnostics.Runtime is integrated to Debugdiag to help rule developers access CLR data easily.
  • New C# sample rules
    16 C#sample analysis rules and 10 XAML analysis rules along with a Visual Studio solution and project to get you started fast in analysis rules development!
  • Workflow Rule Development
    New executable (RuleBuilder.exe) built on workflow 4.0 to allow rule development using drag and drop of DebugDiag activities.
  • New Analysis Rules
    PracticesChecker Rule added to the internal release.
  • Autoupdate
    You will be redirected to the location of the update when new versions are available.

Collection:
  • Isolating Collection from Analysis
    Collection is a discrete and independent component that could be installed alone. 
  • More Memory Dump generation triggers
    Generate Memory Dumps based on Managed Exception Message.
  • Detailed 1st chance exception logging
    Detailed 1st Exception logging based on Exception rate. Minimal handled Exceptions information is logged throughout the life of the process, then the details/summary are written to the end of the log at detach or target process exit/termination time. 

Non-supported items
  • x64 userdump analysis on x86 systems
  • Installing x86 DebugDiag on x64 systems
  • Installing DebugDiag 2.0 and lower versions on the same system
  • Installing Analysis module on Windows 2003/XP

Notes about this release:
Uninstall all previous DebugDiag versions before you install DebugDiag 2.0.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2895198
Revision : 1
Created on : 1/7/2017
Published on : 10/3/2013
Exists online : False
Views : 1381