August 16, 2010

Just a quick one. If you set breakpoints in a windows workflow but during debug it skips right past them it might mean things have not have been reflected on the underlying XAML file. So make a small change to the workflow surface, save it, build the project and try again.

I found the answer in the “How to: Set Breakpoints in Workflows” page:

Here’s the excerpt that helped, even though I’m not sure I have moved the project to a new folder:

Caution: Breakpoints in a workflow project may not get hit when you press F5 if you have moved a project to a new folder after setting them. When you create a workflow console application, the location of each activity dropped onto the design surface is recorded in the XAML file. This file does not get updated when the location of the project is changes until the workflow is edited. The way to get breakpoints working again is to make a change to it so that the file locations get updated in the XAML.