Up Test, log and debug code samples

Code sample: Trace viewer (WPF)

Last modified on June 14, 2011 15:02

You can use one of the DevForce trace viewers for a "real time" display of trace messages in your application.  In this sample we show how to use the WPF trace viewer.


By default DevForce writes its trace messages to a file, generally referred to as the debuglog.  The log file is a great tool for post-mortem analysis, but if you'd also like to see the trace messages as they happen, one of the DevForce-provided trace viewers can help.


The DevForce installation includes two trace viewer executables, WinTraceViewer.exe and WpfTraceViewer.exe.  The viewers do the same thing, the WPF version has a more up-to-date UI.  There's another trace viewer for Silverlight applications.

The sample shows a very simple WPF application, which displays the WPF Trace Viewer window at startup.  You'll see tracing messages displayed as the application initializes.

Then click the Load Data button on the main form to see the log entries written as a by-product of the data retrieval operation.


Created by DevForce on July 14, 2010 16:40

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade