O'Reilly logo

Microsoft Windows Workflow Foundation 4.0 Cookbook by Andrew Zhu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Debugging a WF program

In this task, we will debug a WF program.

How to do it...

  1. Create a workflow project:

    Create a new Workflow Console Application project under the Charpter01 solution. Name the project as DebugWFProgram. In the opening WF designer panel, author a workflow as shown in the following screenshot:

    How to do it...
  2. 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"
                });
            }
        }
    }
    
  3. Set a debug break point:

    Right-click an activity and select Breadpoint ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required