Edit

Share via


Display WPF trace information for data binding

Visual Studio can receive debug trace information for data binding from WPF applications and display that information in the Output window. To display debug trace information, WPF tracing must be enabled.

You can enable WPF tracing in your App.Config file or programmatically by using the PresentationTraceSources class. An easier way to enable WPF tracing is by using the Options window. WPF tracing for web applications isn't supported.

Enable or customize WPF trace information

  1. Open the Tools > Options pane and expand the All Settings > Debugging > Output Window > WPF Trace Settings section.

  2. In the dropdown list for the Data Binding option, select the level of trace information for Data Binding in WPF.

  1. Open the Tools > Options dialog and expand the Debugging > Output Window section.

  2. Under General Output Settings, select the All debug output option.

  3. In the box on the right, open the WPF Trace Settings node.

  4. Under WPF Trace Settings, select Data Binding. A dropdown list appears in the Settings column.

  5. In the dropdown list for the Data Binding option, select the level of trace information for Data Binding in WPF, and then select OK.

The following trace levels are supported:

  • Critical: Trace Critical events only.

  • Error: Trace Critical and Error events.

  • Warning: Trace Critical, Error, and Warning events

  • Information: Trace Critical, Error, Warning, and Information events.

  • Verbose: Trace Critical, Error, Warning, Information, and Verbose events.

  • ActivityTracing: Trace Stop, Start, Suspend, Transfer, and Resume events.

  • All: Trace all available trace information.

For more information about the trace levels, see SourceLevels.