1

Is it possible to debug FeatureActivated?

I am doing:

  1. Deploy ->
  2. Set Breakpoint in the public override void FeatureActivated ->
  3. Attach the process to the debugger ->
  4. refresh.

This doesn't work because the app has already been deployed and activated.

How do I tell it to insta-stop and let me walk through the activation process.

1

deploy >> set break point >> attach process to debugger then goto site action >> site settings >> manager site features >> deactivate feature and then activate it again.

1

You can add the line to your code:

System.Diagnostics.Debugger.Launch();

Once the feature is activated, you will see Debug popup dialog and connect to the process.

1

Yes it is.

  1. Disable auto-activation at deploy time : Your SharePoint project > Properties > SharePoint > "Current deployement configuration" > Set "none"
  2. Deploy
  3. Attach the debugger : Debug > Attach process > select w3wp.exe
  4. Set some breakpoints
  5. Activate manually your feature : Site Settings > Site collection feature (if the feature's scope is site)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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