Debugging featureReceiver

May 6, 2008 at 3:08 PM
Hi,

I have a featureReceiver that I created within a STSDev solution. How would I go about debugging it? I have tried attaching all the w3wp processes but to no avail. My code is featureActivated method.

Thanks,
Emon
May 7, 2008 at 7:34 PM
Create a new project as a class library project, transfer all the content there, and deploy using your own .wsp. Use the wsp builder tool to create the wsp.
I was not able to debug any of the projects created using this tool.
Coordinator
May 8, 2008 at 6:54 AM
What type of problems are you having? Are you getting an error? I've been able to debug each of the solution types I've worked with (probably 4 or 5 of them). What version of VS are you running?

Dave
May 11, 2008 at 4:52 PM


dmann wrote:
What type of problems are you having? Are you getting an error? I've been able to debug each of the solution types I've worked with (probably 4 or 5 of them). What version of VS are you running?

Dave



@Dave,

I can answer some of this i think since i have the same issue. The solution is deployed using debugDeploy or debugRedeploy and everything works fine in sharepoint. The problem is when I attach to process and put a breakpoint anywhere in any of the classes, we get the no symbols loaded error.

If i take the project , transfer it to a regular library project and use wsp builder and deploy that wsp, then i can debug no problem. I tried playing around with the debug properties in the project configuration panel in VS but i wasn't able to make it work.

I am using VS2008 and when i create a project using STSDEV tool i have to select VS2008 with 3.0 cause 3.5 does give an error and the project created is invalid. With 3.0 though, it works.
May 15, 2008 at 7:33 AM

Hello,

Do not use debugDeploy or debugRedeploy because these two build targets do not generate the .pdb file which contains the debug symbols and therefore you cannot debug.

Insteada, use the debugBuild, then place your dll in the GAC assembly (either with the aid of gacutil, or just drag&drop your dll in the "Assembly" folder) and reset your application pool or the entire IIS.

 

Hope it helps,

Tudor

May 29, 2008 at 3:46 AM
I have tried as tudy5102 told, but still not debuggable. Then I searched internet and found this article

http://sharepointers.blogspot.com/2008/05/debugging-your-assemblies-generated.html

It works fine for me. Hopes it help everyone who encounters the same problem.