Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
If you don’t properly handle exceptions in the workflow and an error occurs, you’ll get the dreaded Error Occurred string in the workflow status, without a clue as to what went wrong. You’re left with debugging your workflow and, if you don’t know how to debug, you’re up a creek.
Let’s start with what’s easy—debugging. You debug your workflows almost the same way as any other .NET application you build. Within your workflow’s code view, right-click on the line of code where you want to start debugging and choose Breakpoint > Insert Breakpoint (figure 12.1). Also note that you can debug the activities on the templates. To do this, right-click the activity you want to debug and select Breakpoint > Insert Breakpoint again.