Tracing Workflow Foundation
Last changed: -80.126.16.139

.
Summary

Figuring out what is going on 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:

<configuration>
  <system.diagnostics>
    <switches>
      <add name="System.Workflow LogToTraceListeners" value="1" />

      <add name="System.Workflow.Runtime.Hosting"     value="Verbose" />
      <add name="System.Workflow.Runtime"             value="Verbose" />
      <add name="System.Workflow.Runtime.Tracking"    value="Verbose" />
      <add name="System.Workflow.Activities"          value="Verbose" />
      <add name="System.Workflow.Activities.Rules"    value="Verbose" />
    </switches>
    <trace>
      <listeners>
        <add name="ConsoleTraceListener" type="System.Diagnostics.ConsoleTraceListener" />
      </listeners>
    </trace>
  </system.diagnostics>
</configuration>

Valid value are:

Off No messages
Error Only error messages
Warning Error and warning messages
Information Information, error and warning messages
Verbose All kind of messages

If you are tracing a workflow hosted in IIS you need to make sure that the IIS worker process has the necessary rights to create and write to the log file specified.