Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Workflow debugging does not work (Visual Studio 2005)

  Asked By: Reuben    Date: Mar 25    Category: Sharepoint    Views: 3419

No matter what I try, I cannot get the symbols to load when trying to
debug a workflow. I have followed the MSDN steps of building the
feature for a working workflow, deploying to the GAC, restarting IIS,
then starting the workflow.

I then proceed to Attach to Process... in VS05, find the w3wp process
that has Workflow in the type (it also has T-SQL, Managed, and x86).
I choose Workflow in "Attach To."

I usually get the "No symbols were loaded" problem, where no
breakpoints will be hit (they are hollow are have ! next to them). I
have had VS crash, and also had it say "Failed to attach to these
types of code: Workflow" then saying the debugger is unstable.

I was told there is code to put in the workflow that will make
breakpoints available, but haven't found info on this. I have also
heard having sql assemblies can mess it up, but am not using any
(there is the t-sql type running in w3wp).

Any help on this would be appreciated! I have been attempting this
for weeks! Does anyone debug workflows regularly?



4 Answers Found

Answer #1    Answered By: Darrin Massey     Answered On: Mar 25

I have struggled with this myself to the point of
kicking a dent in my filing cabinet. I assume you
have tried all of the basics (clearing out Temporary
ASP.Net files, rebuilding, restarting Visual Studio,
rebooting your server).

When you attach to the process, ensure that your
"attach to" option is set to "Workflow code" only. If
you select t-sql, then you will have unexpected

Consider reinstalling the .Net Framework 2.0 and 3.0.
In my case, it mostly fixed the problem. Debugging
now works 90% of the time.

Consider reinstalling the Visual Studio 2005
Extensions for Framework 3.0. I have read that these
extensions provide necessary debugging  components.
It's possible they have been corrupted.

Finally consider building your workflow  in Visual
Studio 2008. Workflow debugging is done differently
in 2008 -- you don't need to attach to a process. You
can just use the run menu.

Your problem is a tough one to solve because there are
so many places where things could be screwed up. Try
not to break any office furniture.

Answer #2    Answered By: Jeffrey King     Answered On: Mar 25

Looks like you are already ensuring that attach to is set to Workflow
code; that's the most common reason that it doesn't work.

I too have seen situations where my breakpoints are not hit for no
explanation. When that happens, I try writing the exception out using a
Fault and LogToWorkflowHistoryList. That seems to work  fairly well. If
you need more data in your output, perhaps you can write it to the
.OtherData property and then view the hidden Workflow History List.
Check out post on the topic:

This is quite old and I haven't viewed it myself, but it may also prove

Answer #3    Answered By: Kendrick Townsend     Answered On: Mar 25

I've seen the code also. Instead of doing that I usually just go into
the Options and under Debug there is an entry for Symbols location. I
point that at the Debug output directory. That seems to work  for me.

To set the .pdb (symbols) location go to Tools > Options > Debugging >
Symbols. Click on the new folder icon in the panel and enter the full
path to your debug directory. Click OK to exit and try your attach to
w3wp process again.

Answer #4    Answered By: Jermaine Schmidt     Answered On: Mar 25

just going into the Project
Properties > Debug & setting the start options 'Working directory' to
the project's debug folder (it was even defaulted to there when I
clicked browse, arg!!)

I had tried just about everything else, short of reinstalling and
rebuilding things, which was next.

Didn't find what you were looking for? Find more on Workflow debugging does not work (Visual Studio 2005) Or get search suggestion and latest updates.