SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been given some source code for a solution written for Microsoft Windows SharePoint Services 3.0 - with no instructions for how to get it up and running in Visual Studio.

I've installed Visual Studio 2010 Pro and installed the various references for the solution on a Windows Server 2003 x86 bit virtual machine. Everything compiles fine with 0 errors.

Now I am used to debugging with VS2012 and SharePoint 2010 where you have a SharePoint solution template - click the Debug button and off you go - which I have been doing for the last 6 or so months. But this is looking kind of alien to me.

There are 2 projects in the solution. One for the main application and the other for the common functionality on which the main application depends. Both are set to Class Library type projects. It looks like the WSP files are created by a Cab.ddf - which I have not seen before alongside a familiar manifest.xml file.

So, does anyone have any tips or instructions for debugging on this platform? I'd like to get it up and running and step through code.

share|improve this question

I am presuming that you have been able to deploy the solutions and that the class libraries are compiled as a debug release with DEBUG defined.

Debugging the code will require working out which process is running the code. For Web Parts, Application Pages, Custom fields etc then its the w3wp process which is running your SharePoint Web Application.

Steps to be able to debug

  • Deploy your code
  • Recycle your SharePoint Application Pools or do IISReset
  • Restart SPTimerv3 service if debugging Timer Jobs
  • Browse to a page with the web part / custom field etc
  • In Visual Studio click Debug-> Attach To Process
  • Tick Show Process from all users
  • Identify which w3wp process either using the account name that its running as
  • If unsure select all of them
  • Click Attach
  • Ensure you breakpoint has been picked up
  • Refresh your page

If you need to identify the appropriate w3wp process use the command c:\windows\system32\inetsrv\appcmd.

  • Command Prompt
  • cd /d c:\windows\system32\inetsrv
  • appcmd list WP

This will display a list of processes including the process id. When attaching the debugger to a process use the ID that you found using the 'appcmd' tool to select the right one.

Longer term I would seriously suggest restructuring your solution so that you can take advantage of something like WSPBuilder. This tool will automatically build the solution for you.

The Visual Studio tools have come a long way!

share|improve this answer
Excellent information thanks. Will check these out – Andez Aug 5 '13 at 10:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.