blog community

Welcome to blog community Sign in | Join | Help
in Search

Marcel de Vries, MVP Team System

.NET Technologies, Architecture and Web Development

How to solve Visual studio crash on attach process for debugging a sharepoint workflow

The past couple of days I have done some work on creating custom workflows in the new Windows SharePoint V3 environment.

I must say that it is quite a good environment from an end user perspective and the activities out of the box available are, after reading some blogs, quite appealing. The sharepoint activities have some interesting twists if it comes to correlation, but that is beond the scope of this post. (Go here and here, these posts are a must read to grasp the way correlation works with those activities)

One thing I kept running into is the fact that once you deployed a workflow into the MOSS server, I wanted to debug my workflow. The way to do this is that you choose Attach process from your project and then select the right w3p instance. The problem I kept running into is that visual studio always crashes when you do this when a workflow is running inside the w3p process.

So I had to go through some steps to effectively get my debugger attached without a crash: First deploy the workflow in MOSS, then hit some pages on the site, then attach the debugger and fire of a new workflow. Any other sequence would fail on me.

I found that this issue can be resolved by only selecting workflow as the only thing to attach to in the attach dialog. See screenshot below:

Now you are able to attach the debugger any time you want without crashing the IDE. I must say after finding this solution, life got a whole lot better. It literally saved me hours debugging.

Hope this helps you to be more productive J

Published Monday, January 29, 2007 9:41 PM by marcelv

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Bart Gunneman said:

Great work, Marcel!

This saves a lot of time :)

January 30, 2007 7:10 AM
 

Daniel said:

Great, this will save me loads of time!! =]

March 6, 2007 8:52 PM
 

Simon Doy said:

Thanks Marcel,

I have just been looking as to why msdev kept bombing out. Heres another one for you. If you want to debug WF remotely - need to install VS on the MOSS box!

Simon

March 21, 2007 6:27 PM
 

Czarek said:

Marcel your a life saver!!!

April 20, 2007 12:07 PM
 

ajay said:

thanks a lot

May 16, 2007 11:18 AM
 

Jordi said:

Thanks for this great trick. It is going to save me a lot of hours of work!!!

August 14, 2007 3:27 PM
 

Mirrored Blogs said:

Ever come across the problem where you want to debug your workflow so you attach VS.NET to the w3wp process

August 17, 2007 10:12 PM
 

Øyvind Habberstad said:

Perfect! Thanks to you I'm debugging my first workflow! :-)

August 19, 2007 10:51 AM
 

Popul said:

Idem, why don't i think to this issue earlier. Thx a lot !!

September 14, 2007 1:07 AM
 

Eric Halsey said:

You are awesome!~  

Thanks a bunch!

October 4, 2007 6:24 PM
 

Alain said:

Thank you so much for this insight. You saved my day.

October 22, 2007 10:30 PM
 

Ola said:

BIG BIG Thanks!!

November 5, 2007 6:25 PM
 

Tod Thomson said:

Yes, thanks for that one :) I was getting to the point where I was almost going to go postal!!! :)

December 10, 2007 5:01 AM
 

beifeng2744 said:

Great, thanks!

December 11, 2007 6:45 AM
 

You da man! Thanks said:

This also was killing me.

March 5, 2008 8:36 PM
 

Jorge Carvalho said:

Thank you!!!!

April 2, 2008 10:50 AM
 

saso said:

nice one

May 6, 2008 10:05 AM
 

Garth said:

Thanks this saved me alot of time :))

May 27, 2008 1:27 PM
 

Roberto Vasquez said:

THANKS YOU!  I had spent a couple of days traying so many different things, and bingo!! Thanks to you I got it to work!!!

July 28, 2008 9:58 PM
 

Venkatesan J said:

Thanks a ton Marcel. I was trying to find a workaround for this and almost wasted two days in this. You are a life saver.

August 14, 2008 10:20 AM
 

Venkatesan J said:

Thanks a ton Marcel. I was trying to find a workaround for this and almost wasted two days in this. You are a life saver.

August 14, 2008 10:20 AM
 

Jason said:

This had been giving me the biggest headache.

September 25, 2008 8:11 PM
 

Data Cogs Information Technology said:

November 12, 2008 7:11 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems