views:

553

answers:

1

Hi folks,

Is it true that you can't hit breakpoints in VS.NET 2008 workflow designer for workflows stored in a library, when invoked externally?

I've got a Sequential Workflow Library project and a console app project in the same solution. I call the workflow from the app with code such as this (VB.NET):

Dim wr As WorkflowRuntime = New WorkflowRuntime()
Dim wi As WorkflowInstance = _
    wr.CreateWorkflow(GetType(PaymentWorkflow), parameters)
wi.Start()

I set the console app as startup project and put a break point in the workflow designer for the workflow being invoked this way, but I get the dreaded "breakpoint won't be hit" symbol and, indeed, it's not hit.

Is it not possible to debug workflows invoked in this way? I hope this isn't true, because my goal was to make a library of workflows which will be called from external processes, and I'll definitely need to debug them.

Thank you, Bill Dawson

(Environment: VS.NET 2008 SP (9.0.30729.1), .NET 3.5 SP1, and with KB957912 patch for debugging installed.)

+1  A: 

What you need to do is set your library with the workflow as your startup program. Now go into the project settings and tell it to execute your console application when run using the start external program in the debug tab. This way the debugger will stop on breakpoints in your workflow and allow you to step through them.

Maurice