Debugging Workflows using Workflow Manager Tools 1.0


Updated: April 10, 2013

Workflow Manager Tools 1.0 for Visual Studio 2012 provides support for debugging workflows during design-time. This topic provides instructions for debugging workflows in Visual Studio using Workflow Manager Tools.

The steps in this section describe how to start a debugging session, set breakpoints, and debug a workflow using Workflow Manager Tools. For instructions on installing Workflow Manager Tools, see Workflow Manager Tools 1.0 for Visual Studio 2012 installation.

During a debugging session, the workflows being debugged are published to the workflow resource database.

  • If Workflow Manager is installed on the development machine, Workflow Manager Tools configures the debugging tool to use the same database as Workflow Manager.

  • If Workflow Manager is not installed on the development machine, Workflow Manager Tools creates a set of databases on the Sql Server installation that is created during Visual Studio 2012 installation. These databases have the same schema as the Workflow Manager databases.

Workflows published to the database during debugging sessions are not deleted and remain in the databases after the debugging session completes.

To start the debugging tool

  1. Open an elevated command prompt.

  2. Navigate to the installation directory for Workflow Manager Tools.

    • x86: C:\Program Files (x86)\Workflow Manager Tools\1.0

    • x64: C:\Program Files\Workflow Manager Tools\1.0

  3. In the command prompt, run Microsoft.Workflow.TestServiceHost.exe and wait until the messages indicate loading is complete before debugging a workflow.

To debug a workflow

  1. Add the desired breakpoints in your workflow. Breakpoints can be added by right-clicking a workflow in the workflow designer and choosing Breakpoint, Insert Breakpoint, or by selecting an activity in the workflow designer and pressing F9.

  2. Attach the Visual Studio debugger to the Microsoft.Workflow.TestServiceHost.exe process by choosing Attach to Process from the DEBUG menu. Choose Microsoft.Workflow.TestServiceHost.exe from the Available Processes list and click Attach.

  3. Press F5 to start debugging.

Community Additions