How do I debug a SharePoint add-in?

How do I debug a SharePoint add-in?

Here are the steps to debug a web part in SharePoint.

  1. Open the project and set appropriate breakpoints.
  2. Create a Web Part page on the default SharePoint site.
  3. Add the Web Part to the page.
  4. Attach the debugger to the W3wp. In the Debug menu in Visual Studio . NET, click “Processes”.

How do I debug a hosted app?

Right-click on the Azure web site where you published your provider-hosted app and select Attach Debugger. The browser opens to your Azure web site, and VS.NET starts up in debugging mode. Set your breakpoints in your code and start debugging!

How to end debugging session with SharePoint add-in?

To end the debugging session, close the browser window or stop debugging in Visual Studio. Each time you select F5, Visual Studio retracts the previous version of the add-in and installs the latest one. By default, the add-in remains installed on the SharePoint host web in between debugging sessions in Visual Studio.

How to debug SharePoint applications in Visual Studio?

The following sections explain how to debug SharePoint applications in Visual Studio. When you first debug a SharePoint solution in Visual Studio, a dialog box alerts you that the web.config file is not configured to enable debugging.

Can a SharePoint add in be hosted in Office 365?

This applies to provider-hosted SharePoint add-ins rather than SharePoint-hosted add-ins, and also doesn’t apply to apps which use the Office 365 APIs as an alternative to the SharePoint add-in model.

How to register an add in in SharePoint?

But here are the key changes to make from “development mode”: Deal with the add-in registration – go to AppRegNew.aspx in the SharePoint environment the add-in will be used in, and register the add-in (reminder – either see my last link or Guidelines for registering apps for SharePoint 2013 if you’re not clear on this step!)