I have a very simple workflow in Visual Studio 2015 Update 3 consisting of a single WriteLine activity:

This console utility, Microsoft.Workflow.TestServiceHost.exe found in C:\Program Files (x86)\Workflow Manager Tools\1.0, attaches to the registered Workflow Manager instance and listens for messages written using the WriteLine activity

The workflow is deployed to an on-prem SharePoint Server 2013 Enterprise with Workflow Manager 1.0 Cumulative Update 3. Everything, SharePoint, Workflow Manager and Visual Studio, is installed on the same machine running Windows Server 2012 R2.

No matter what I do the TestServiceHost console does not show any of the messages from WriteLine activity. I can hit breakpoints inside the workflow, though, if I attach to the Microsoft.Workflow.ServiceHost.exe process.

Has anyone managed to make TestServiceHost working?

1 Answer 1


I had the same problem as you when trying to understand how to debug my workflows. The Microsoft Documentation says that but when you use a WriteLine activity without a TextWriter the default behaviour will be the "console".

This console should be the TestServiceHost window but, sincerely I don't know why it doesn't writes there.

The good news is that you should attach Visual Studio to the Microsoft.Workflow.ServiceHost.exe process to stop at the breakpoints in your workflow BUT your WriteLine messages will go to the Visual Studio output window because that is the "console" in that case.

So check that between the output window messages (thread messages fill usually the console) appear what you want to write. I hope that helps.

  • Thanks, I didn't notice that. But I can attach to Microsoft.Workflow.ServiceHost.exe only when running Visual Studio on the same machine with SharePoint, which is an inconvenience for me.
    – Rustam
    Feb 22, 2017 at 13:51
  • @Rustam in fact, to attach to ServiceHost process you only need Visual Studio in the same server as the workflow manager, because TestServiceHost will connect automatically with the workflow manager instance existing in that server.
    Feb 22, 2017 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.