Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Because add-ins are developed using HTML and JavaScript, they are designed to work across platforms, but there might be subtle differences in how different browsers render the HTML. This article describes how to debug add-ins running on a Mac.
Prerequisites
Mac OS High Sierra or later.
Office on Mac version 16.9.1 (Build 18012504) or later. You might qualify for a Microsoft 365 E5 developer subscription through the Microsoft 365 Developer Program; for details, see the FAQ. Alternatively, you can sign up for a 1-month free trial or purchase a Microsoft 365 plan.
Important
Office on Mac must be installed from Office.com, not the Apple App Store or Mac App Store.
Debug with Safari Web Inspector
If you have add-in that shows UI in a task pane or in a content add-in, you can debug an Office Add-in using Safari Web Inspector. To start, open a terminal and set the OfficeWebAddinDeveloperExtras property for the relevant Office application as follows. Run the command for each Office host application that you want to debug.
defaults write com.microsoft.Word OfficeWebAddinDeveloperExtras -bool true
defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true
defaults write com.microsoft.Powerpoint OfficeWebAddinDeveloperExtras -bool true
defaults write com.microsoft.Outlook OfficeWebAddinDeveloperExtras -bool true
Note
If you're debugging an event-based or spam-reporting add-in in Outlook on Mac, follow the steps in Debug event-based or spam-reporting add-ins after configuring the OfficeWebAddinDeveloperExtras property. Otherwise, continue with the following steps.
- Open the Office application and sideload your add-in.
- Open the add-in UI.
- Right-click (or select and hold) the add-in and select Inspect Element option in the context menu. The Inspector opens, where you can set breakpoints and debug your add-in.
Note
If you're trying to use the inspector and the dialog flickers, update Office to the latest version. If that doesn't resolve the flickering, try the following workaround.
- Reduce the size of the dialog.
- Choose Inspect Element, which opens in a new window.
- Resize the dialog to its original size.
- Use the inspector as required.
Clear the Office cache on Mac
Add-ins are often cached in Office on Mac for performance reasons. For guidance on how to clear the Office cache on Mac, see Clear the Office cache on Mac.
See also
Office Add-ins