R – Can not debug the SharePoint

debuggingsharepoint

My OS is 64bit Server 2008, 64bit SharePoint2007 SP2, Visual Studio 2008 SP1.

I write a web part and deploy it to the server, it works fine, but I still want to debug it. I find the w3wp.exe's process ID(port 80), then I attach it to the Visual Studio as I do on the server 2003, but it seems do not work. But I make some breakpoints at the button event of this web part, after I attach it to the VS and click the button, it could not stop at the breakpoint. Does any one meet this problem before.

Best Regards,

Best Answer

Some suggestions:

  1. Make sure you have recycled the application pool before attaching to the w3wp process.
  2. Build in Debug mode, ensure .pdb files are generated.
  3. Attach to the correct w3wp process. If you don't know, you could (but not recommended) attach to all w3wp's. Usually it would be the one used by the application pool account.