开发者

Attaching a process to an Event Handler in Visual Studio 2010 for Sharepoint 2010 site

开发者 https://www.devze.com 2023-01-13 07:17 出处:网络
I\'ve written an event handler for sharepoint 2010site using visual studio 2010 . I had attached a breakpoint to the code and followed the process which i had done in visual studio 2008.

I've written an event handler for sharepoint 2010 site using visual studio 2010 . I had attached a breakpoint to the code and followed the process which i had done in visual studio 2008.

It is to use the Attach to process option a开发者_如何学运维nd select the w3wp option.

The event gets attached but the breakpoint is not firing.

I ve checked the site collection and checked the MAnage site settings to see if the event handler is enabled. It is enabled. I tried to disable and enable it again. Even now its not firing.

Also i tried to clean the build solution and re built it . The debugger is not firing.

Do post a reply

Thanks in advance Baradhwaj.PC


Here are a few things to check:

Are you attached to the correct process?

  • Using appcmd.exe list wp on the server (IIS7+) can be a useful way to determine which process ID belongs to which App pool. If you attach to the wrong process ID, even if it is the right name, the breakpoint won't fire.

Are your PDB's installed with the .dll's?

  • When I use GAC-based deployments, I often use a PowerShell script to copy my PDB files into the GAC folder where the assembly lives, usually something like C:\WINDOWS\assembly\GAC_MSIL\MYLibrary\1.0.0.0_publickeytoken.
  • When using bin-based deployments, it is sufficient to ensure the pdb is also in the bin folder.

While debugging, check the "Modules" debug window.

  • Find your assembly to determine whether debug symbols were loaded. If they are not, read the reason why. Note that you may need to invoke your code at least once for the assembly to get loaded.
  • Sometimes, it might mention that the pdb version doesn't match the assembly. This might happen if you built and deployed without pushing out a new pdb, even if you made no changes to the code. If this occurs, just redeploy a freshly-built assembly and pdb.


Are the PDB files in the path in which you are debugging? Without the PDB files, I think Visual Studio will be unable to link your code to the breakpoints.

0

精彩评论

暂无评论...
验证码 换一张
取 消