DebugSettings DebugSettings DebugSettings DebugSettings Class

Definition

Declares how certain aspects of the app behave when it is run in a debug environment

public : sealed class DebugSettings : IDebugSettings, IDebugSettings2, IDebugSettings3
struct winrt::Windows::UI::Xaml::DebugSettings : IDebugSettings, IDebugSettings2, IDebugSettings3
public sealed class DebugSettings : IDebugSettings, IDebugSettings2, IDebugSettings3
Public NotInheritable Class DebugSettings Implements IDebugSettings, IDebugSettings2, IDebugSettings3
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Examples

This example shows an OnLaunched override that accesses Application.DebugSettings and sets two properties of the singleton DebugSettings value to true. The context of this code is the app.xaml code-behind, so this refers to the created Application object for the app.

protected override void OnLaunched(LaunchActivatedEventArgs args) {
    this.DebugSettings.EnableFrameRateCounter = true;
    this.DebugSettings.IsOverdrawHeatMapEnabled = true;
    //...
}

Remarks

This class can't be constructed. Get the value from Application.DebugSettings and then change the properties as necessary.

OnLaunched is a good place to change DebugSettings values.

Not all modes enabled by DebugSettings require that a debugger is attached. For example, the frame-rate counter associated with EnableFrameRateCounter will appear in an app that runs with that setting even if you activate it as a tile without the debugger.

Don't leave any DebugSettings properties explicitly set in your production code.

Properties

EnableFrameRateCounter EnableFrameRateCounter EnableFrameRateCounter EnableFrameRateCounter

Gets or sets a value that indicates whether to display frame-rate and per-frame CPU usage info. These display as an overlay of counters in the window chrome while the app runs.

EnableRedrawRegions EnableRedrawRegions EnableRedrawRegions EnableRedrawRegions

Gets or sets a value that indicates whether to highlight areas of the app UI surface that are being redrawn each frame.

IsBindingTracingEnabled IsBindingTracingEnabled IsBindingTracingEnabled IsBindingTracingEnabled

Gets or sets a value that indicates whether to engage the binding tracing feature of Microsoft Visual Studio when the app runs.

IsOverdrawHeatMapEnabled IsOverdrawHeatMapEnabled IsOverdrawHeatMapEnabled IsOverdrawHeatMapEnabled

Gets or sets a value that enables a debug setting that visualizes overdraw operations. This visualization is useful during application development for detecting layout, animation, and other operations that are graphics processing intensive.

IsTextPerformanceVisualizationEnabled IsTextPerformanceVisualizationEnabled IsTextPerformanceVisualizationEnabled IsTextPerformanceVisualizationEnabled

Gets or sets a value that indicates whether to engage the text performance visualization feature of Microsoft Visual Studio when the app runs.

Events

BindingFailed BindingFailed BindingFailed BindingFailed

Occurs when a Binding cannot be resolved.

See Also