Workflow Services Limitations: Part 4 – Breakpoints Not Fired

May 14, 2008

tags: ,
no comments

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:


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:


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.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>