Debugging SharePoint Feature in SP2013

90 views Asked by At

I have just wrote my first SharePoint Feature, which I can activate in my site. Now I am trying to debug this Feature, I specify the breakpoints, but it's still not working.

I just have a JavaScript file (which I can debug on browser), and a webpage which inherit from LayoutsPageBase.

In MSDN, I noticed that they are adding Feature Receiver to debug it, do I really need it to debug? Or can I just enable debugging without it?

1

There are 1 answers

1
Eric Gregorich On

A SharePoint Feature by itself is just a way to enable your other assets, in this case your JavaScript file and web page.

Adding a Feature Receiver will let you execute custom code when the feature is activated/deactivated. If you are using a feature receiver you can put a breakpoint in the feature receiver code and when you activate/deactivate the feature it should hit the breakpoint.

If you do not need a feature receiver, then you do not really debug the feature, you debug the web page that you are deploying.

Can you be more specific on what exactly your trying to debug?