Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DebugSettings class

Applies to Windows and Windows Phone

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

Inheritance

Object
  DebugSettings

Syntax


public sealed class DebugSettings

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The DebugSettings class has these types of members:

Events

The DebugSettings class has these events.

EventDescription
BindingFailed Occurs when a Binding cannot be resolved.

 

Methods

The DebugSettings class inherits methods from the Object class.

Properties

The DebugSettings class has these properties.

PropertyAccess typeDescription

EnableFrameRateCounter

Read/writeGets 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

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

IsBindingTracingEnabled

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

IsOverdrawHeatMapEnabled

Read/writeGets 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.

 

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.

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;
    //...
}

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml
Windows::UI::Xaml [C++]

Metadata

Windows.winmd

See also

Application.DebugSettings
Data binding overview
Performance best practices for Windows Store apps

 

 

Show:
© 2014 Microsoft