DCSIMG
Workflow Services Limitations: Part 4 - Breakpoints Not Fired - All Your Base Are Belong To Us

All Your Base Are Belong To Us

Mostly .NET internals and other kinds of gory details

Workflow Services Limitations: Part 4 - Breakpoints Not Fired

I love showing people the power of declarative, designer-driven programming when I first introduce them to Workflow Foundation.  The workflow designer is a feast for the eyes:

image

One of the first questions people always ask me is whether the workflow can be debugged just as easily as a bunch of cooperating components.  The answer, as usual, is: It Depends.

Theoretically, you can always place a breakpoint on an activity and when the workflow executes then execution will stop at the breakpoint:

image

However, this doesn't always work.  Specifically, it works in a simple project but then stops working when you really need the debugging support.  Specifically, when you're loading the workflow assembly using Assembly.LoadFrom (it's not one of the most friendly APIs out there, by the way).

Workaround?  Well, if it's a CodeActivity, put a breakpoint in the method being called.  If it's a SendActivity, put a breakpoint in the BeforeSend event handler.  You get the idea.

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: