Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Debugging a Custom Workflow Activity

Debugging a Custom Workflow Activity

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

To debug a custom workflow activity, copy the pdb file for the assembly to the %installdir%\server\bin\assembly folder. The assembly can be located on disk or in the database. Then, attach the debugger to the Microsoft Dynamics CRM asynchronous service (CrmAsyncService.exe) process. Make sure that you remove the pdb file when you have finished debugging because it uses memory to have it loaded. For more information, see Debugging a Plug-in.

You can also enable tracing to debug the execution of your custom workflow activities. To enable tracing, create a file named CrmAsyncService.exe.config that contains the following code:

<?xml version="1.0" encoding="Windows-1252"?>
<configuration>
<system.diagnostics>
    <switches>
        <add name="System.Workflow LogToTraceListeners" value="1" />
        <add name="System.Workflow.Runtime" value="Verbose" />
        <add name="System.Workflow.Runtime.Hosting" 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 autoflush="true" indentsize="4">
    <listeners>
      <add name="customListener"
     type="System.Diagnostics.TextWriterTraceListener"
     initializeData="c:\\logs\\Winwftrace.log" />
    </listeners>
  </trace>
</system.diagnostics> 
</configuration>

Copy the file to the <crm-root>\Server\bin folder, for example: C:\Program Files\Microsoft Dynamics CRM\Server\bin, on the server that executes the Asynchronous Service. This server is usually the Microsoft Dynamics CRM server. Verify this with your system administrator.

Notice that in this sample configuration file, the trace log is written to C:\logs\Winwftrace.log.

See Also

Other Resources


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2015 Microsoft