Friday 5 October 2012

how to debug sharepoint feature activation

While Activating feature, we want to debug feature to go through the activation process so that we can check the issue at development server without checking the log file.
After googling I found the way to debug feature. It is as follows:


Steps

To debug a feature receiver in Visual Studio 2010
  1. Open the Visual Studio 2010 project that contains your feature.
  2. In Solution Explorer, right-click the project node, and then click Properties.
  3. On the SharePoint tab, in the Active Deployment Configuration drop-down list, click No Activation.
  4. Open the feature receiver class that you want to debug, and then insert a breakpoint.
  5. Press F5 to deploy and debug your solution. In the Attach Security Warning dialog box, click OK.
  6. Activate your feature through the browser user interface.
  7. Verify that the debugger stops at your breakpoint.
And Done.

You can find MSDN article from where I obtained this process Here

No comments :

Post a Comment