Debugging a WF program
In this task, we will debug a WF program.
How to do it...
- Create a workflow project:
Create a new Workflow Console Application project under the
Charpter01
solution. Name the project asDebugWFProgram
. In the opening WF designer panel, author a workflow as shown in the following screenshot: - Create workflow host code:
Open
Program.cs
file and change the code to:using System.Activities; using System.Activities.Statements; namespace DebugWFProgram{ class Program{ static void Main(string[] args){ WorkflowInvoker.Invoke(new Workflow1() { InMessage="In Message" }); } } }
- Set a debug break point:
Right-click an activity and select Breadpoint ...
Get Microsoft Windows Workflow Foundation 4.0 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.