DebugSettings.FailFastOnErrors Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether XAML errors cause an immediate FailFast rather than returning an error.
public:
property bool FailFastOnErrors { bool get(); void set(bool value); };
bool FailFastOnErrors();
void FailFastOnErrors(bool value);
public bool FailFastOnErrors { get; set; }
var boolean = debugSettings.failFastOnErrors;
debugSettings.failFastOnErrors = boolean;
Public Property FailFastOnErrors As Boolean
Property Value
bool
true if XAML errors cause an immediate FailFast rather than returning an error; otherwise, false. The default is false.
Windows requirements
Device family |
Windows 10, version 1809 (introduced in 10.0.17763.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v7.0)
|
Remarks
This property is an aid to help application debugging, but it is not limited to debug builds or use in the debugger. This feature can be enabled by apps even when deployed to the Store.
Enabling FailFastOnErrors lets you find errors earlier, with potentially more usable information. It also causes crashes where errors would otherwise be ignored. For example, with FailFastOnErrors disabled, a XAML Image element raises an Image.ImageFailed event if it can't load an image, but otherwise ignores the error. If FailFastOnErrors is enabled, it will cause the application to crash instead.
The Visual Studio managed code debugger does not break on FailFast errors. You should select the Mixed debugger type in Microsoft Visual Studio on the Debug page of the project designer.
This property is ignored when code is running in a designer (when DesignMode.DesignModeEnabled is true).
When FailFastOnErrors is enabled, the Application.UnhandledException event is not raised.
This property can be changed at any time, not just during app startup.
This property affects all XAML threads in the process.