How to enable workflow tracing (debug)

Published 26 February 09 08:38 AM

This might come in handy whenever you (like myself and I am sure thousands of others) see some error in the execution of one workflow and found the completely useless messages like “Error Occurred”

Dig deep and find nothing

first troubleshooting step would be to enable verbose logging on the workflows category and check the SharePoint logs.

If this does not provide you with a clue on what might be going on, you can try the following thing:

Add the following code to the web.config of the site where the workflow is located after this key :

</System.Workflow.ComponentModel.WorkflowCompiler>

-----------------------------------------------------

  <system.diagnostics>

      <switches>

          <add name="System.Workflow LogToFile" value="1" />

          <add name="System.Workflow.Runtime" value="All" />

          <add name="System.Workflow.Runtime.Hosting" value="All" />

          <add name="System.Workflow.Runtime.Tracking" value="All" />

          <add name="System.Workflow.Activities" value="All" />

          <add name="System.Workflow.Activities.Rules" value="All" />      

      </switches>

  </system.diagnostics>

-----------------------------------------------------

and before this key

<appSettings>

Try to start the workflow.

You should get a debug-level log file created on c:\windows\system32\inetsrv, workflowtrace.log

Additionally, it might happen that sometimes the workflowtrace.log file is  not created automatically ( maybe some permission issues that I didn’t bother to investigate). Just create the file by hand and start the workflow.

You should have all the information you need to troubleshoot the issue in the file.

Cheers

 

Official content published here :http://support.microsoft.com/kb/972914

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Mike Mongeau said on March 5, 2009 11:31 AM:

Great post, Victor! This definitely comes in useful when the ULS or other data aren't shedding any light on the situation.

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

This Blog

Syndication

Page view tracker