Workflow Foundation and tracing

I think Windows Workflow Foundation is one of the more interesting features in WinFx, oops the .NET 3.0 framework. But figuring out what to do can be a challenge. Fortunately they added a number of trace switches to allow you to track what the components are doing. Add the following to the app.config file to see what is going on:

 

<system.diagnostics>
  <switches>
    <addname=System.Workflow LogToTraceListenersvalue=1 />
 
    <addname=System.Workflow.Runtime.Hostingvalue=Verbose />
    <addname=System.Workflow.Runtimevalue=Verbose />
    <addname=System.Workflow.Runtime.Trackingvalue=Verbose />
    <addname=System.Workflow.Activitiesvalue=Verbose />
    <addname=System.Workflow.Activities.Rulesvalue=Verbose />
  </switches>
</system.diagnostics>

 

Valid value are:

Off
No messages
Error
Only error messages
WarningError and warning messages
Info
Information, error and warning messages
VerboseAll kind of messages

 

Enjoy!

 

Maurice de Beijer

2 thoughts on “Workflow Foundation and tracing

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>