26 May 2010

Debugging SharePoint in Windows Server 2008 – IISAPP Is Missing!

I’m currently working on a solution that is built in top of SharePoint 2007.  My development VM is built with Windows Server 2008, to mimic the production environment. 

Whilst debugging an issue the other day, I went  to call the iisapp.vbs script on the command line to identify the correct w3wp.exe process to attach Visual Studio to. (See this article for more details on debugging SharePoint solutions.)

I was surprised to see the following error message:

A quick Google established that in IIS 7 the iisapp.vbs is replaced by the following command:

%windir%\system32\inetsrv\appcmd.exe list wp

Some of you may be thinking “If you’re working in SharePoint 2010 with VS2010, you don’t need this, Visual Studio will automatically attach the debugger to the worker process for you!".

Think again. On a SharePoint 2010 training course, I got to try out the automated debugging offered by VS2010, and it is sloooowwwwwwwwwwwwwwwwwww.... As in, hit F5, go get yourself a coffee, and still have time to dunk a few digestives before the debugger responds.  And this was a Hyper-V VM with 6GB RAM dedicated to it.  So, even in VS2010, you are still going to want to attach the debugger manually.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.