Problem with Debugging of Workflows

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




While working with workflows you may have noticed, that sometimes it is not possible to stop the workflow in debugger. More precisely, the workflow can be stopped in debugger as long the breakpoint is set in code-behind, but not if the breakpoint is set in WF-designer.

I noticed following:

1. This issue can occur by any kind of project which contains the workflow.
2. If the project which contains debugging workflow is set as default startup-projects all works fine.
3. If the default start-project is not the project which contains workflow's code, you may have debugging problem, but not necessary.


1. Open the workflow in designer.
2. Set the breakpoint
3. Set the workflow with breakpoint as start-up project.
4. Start the application which hosts the workflow (do not use VS) and attach to the process which hosts the workflow.
For example, in a case of ASP.NET application you may attach either to aspnet_wp.exe or w3wp.exe

Hope this helps...


Posted Jun 11 2008, 09:34 AM by Damir Dobric


Mark Simms wrote re: Problem with Debugging of Workflows
on 06-11-2008 23:58


One other useful way of doing this (especially running in an environment with multiple application host processes) is to:

1. Open the appropriate solution or project in visual studio.

2. Temporarily embed a System.Diagnostics.Debugger.Launch() in the startup code for the module (perhaps wrapped in an #if DEBUG conditional) and launch the host.

3. From the list of debuggers that will appear, select the one with the project or solution open.

Same outcome, may be a little smoother depending on your development setup (I usually do this for debugging new event handlers for Biztalk RFID).

Mark is a .Net Community Blog powered by daenet GmbH.