Debug add-ins in Office on the web
You can build and debug add-ins on a computer that isn't running Windows or the Office desktop client—for example, if you're developing on a Mac. This article describes how to use Office on the web to test and debug your add-ins.
To get started:
Get a Microsoft 365 developer account if you don't already have one or have access to a SharePoint site.
Set up an app catalog on SharePoint Online. An app catalog is a dedicated site collection in SharePoint Online that hosts document libraries for Office Add-ins. If you have your own SharePoint site, you can set up an app catalog document library. For more information, see Publish task pane and content add-ins to an app catalog on SharePoint.
Debug your add-in from Excel or Word on the web
To debug your add-in by using Office on the web:
Deploy your add-in to a server that supports SSL.
We recommend that you use the Yeoman generator to create and host your add-in.
In your add-in manifest file, update the SourceLocation element value to include an absolute, rather than a relative, URI. For example:
<SourceLocation DefaultValue="https://localhost:44300/App/Home/Home.html" />
Upload the manifest to the Office Add-ins library in the app catalog on SharePoint.
Launch Excel or Word on the web from the app launcher in Microsoft 365, and open a new document.
On the Insert tab, choose My Add-ins or Office Add-ins to insert your add-in and test it in the app.
Use your favorite browser tool debugger to debug your add-in.
The following are some issues that you might encounter as you debug:
The browser might show an invalid certificate error that you will need to bypass. The process for doing this varies with the browser and the various browsers' UIs for doing this change periodically. You should search the browser's help or search online for instructions. (For example, search for "Microsoft Edge invalid certificate warning".) Most browsers will have a link on the warning page that enables you to click through to the add-in page. For example, Microsoft Edge has a link "Go on to the webpage (Not recommended)". But you will usually have to go through this link every time the add-in reloads. For a longer lasting bypass, see the help as suggested.
If you set breakpoints in your code, Office on the web might throw an error indicating that it is unable to save.