How to: Debug Your Windows SharePoint Services Workflow

After you deploy and activate your workflow Feature, you can debug the workflow by opening your workflow project and attaching to the w3wp process.

Because the Visual Studio 2005 Designer for Windows Workflow Foundation is hosted within Microsoft Visual Studio 2005, you can take advantage of the Visual Studio debugging capabilities. You can set breakpoints in the code in your code-beside file.

Note Note:

For ease of debugging, we strongly recommend that you develop your workflow templates on a server running Windows SharePoint Services 3.0.

The Visual Studio 2005 Designer for Windows Workflow Foundation supports not only standard Visual Studio debugging features such as breakpoints and call stack windows, it also includes a range of visual indicators that provide information during the debugging process.

You can perform step in, step out, and step over operations to move through workflow code.

Note Note:

The following types of debugging are not supported by the Visual Studio 2005 Designer for Windows Workflow Foundation: just-in-time debugging of run-time exceptions in the hosting process, and just-in-time debugging by selecting a process in the Task Manager.

For more information about debugging using the Visual Studio 2005 Designer for Windows Workflow Foundation, see the Windows Workflow Foundation SDK.

Note Note:

The Windows Workflow Foundation SDK is available as part of the download titled Visual Studio 2005 Extensions for Windows Workflow Foundation available on the Microsoft Download Center. This download also contains the Visual Studio 2005 Designer for Windows Workflow Foundation, as well as the Windows Workflow Foundation runtime engine.

To attach to the Windows SharePoint Services process to debug a workflow

  1. Install your workflow Feature.

    If you have previously installed your workflow Feature, but you have changed your workflow’s Feature manifest .xml files, uninstall and reinstall the Feature using stsadm.

    For more information about installing Features, see Working with Features.

    Note Note:

    Uninstalling the workflow Feature disables any existing workflow associations for that workflow template. To re-enable a workflow association in a list or content type, on the list or content type Settings page, select Workflow Settings, and then select Remove a workflow. Select the Allow button for the workflow association you want to re-enable.

  2. Install the workflow assembly in the global assembly cache.

  3. Reset Microsoft Internet Information Services (IIS) so that changes can take effect. To do so, open a command line window and type iisreset at the command prompt.

  4. In Visual Studio 2005, attach to the w3wp processes:

    1. On the Tools menu, select Attach to Process.

      Make sure that Attach to: is set to Workflow code. If necessary, click Select; in the Select Code Type dialog box, select Workflow, and then click OK.

    2. Select the w3wp processes, and then click Attach.

      Note Note:

      If the w3wp process is not running, open any Windows SharePoint Services page to activate the process.

  5. Add a breakpoint in your workflow, for example, in the OnWorkflowActivated activity that initiates your workflow.

  6. In the Windows SharePoint Services user interface, initiate your workflow.

    When your assembly loads, the breakpoints are activated, and the debugger halts code execution at the breakpoints in your workflow.

See Also

Reference

>Workflow Development in Visual Studio

Tags : workflow wss


Community Content

User77
w3wp processes
If you still not see the w3wp processes switch in the "Show processes in all sessions" option.
Tags :

infomaven
remote debugging
It looks like we may have to debug our workflow remotely. Where could I find out how to do this?
Tags : contentbug

Needo
w3wp processes

I have twp problems:

I see w3wp processes whoes type is "TSQL,managed" , even though i have sleseted "Show processes in all sessions" option, but some time these are 2, and sometimes its only one, i donot know what to do , well when i select one ot two

2nd problme arises, my break point in the work flow says warning that this breakpoint cannot be hot , no symbols loaded for this document? And please can anyone tell me the best book for developing customized workflows in visual studio 2005

Tags : contentbug

Benson Thomas
Not able to Debug. Breakpoints not breaking
I did all the things and still not able to debug a Custom WorkFlow. Dont know what the issue is?
Tags : contentbug

Page view tracker