Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CrashDumps.EnableCollection Method

Updated: June 6, 2012

Enables collection of mini crash dumps or full crash dumps for a role instance.

Namespace: Microsoft.WindowsAzure.Diagnostics
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)

public static void EnableCollection (
	bool enableFullDumps



Type: System.Boolean

If true, collects full crash dumps. If false, collects mini crash dumps.

When you enable collection of crash dumps, the resulting data is written to the CrashDumps directory in the DiagnosticStore local resource that is automatically configured for your role.

When crash dump data is transferred to persistent storage, it is stored to the wad-crash-dumps Blob container. You can specify the transfer interval of the CrashDumps directory by setting the ScheduledTransferPeriod property of Directories.


The following code snippet creates a DiagnosticMonitorConfiguration object, enables full crash dump collection, and sets a transfer interval of 30 minutes.

public override bool OnStart()
    // Get the default initial configuration for DiagnosticMonitor.
    DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration();
    // Enable full crash dump collection.

    // Schedule a transfer period of 30 minutes. 
    diagnosticConfiguration.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(30.0);

    // Start the DiagnosticMonitor using the diagnosticConfig and our connection string.
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagnosticConfiguration);

    return base.OnStart();

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

Community Additions

© 2015 Microsoft