Edit

Debug Office Add-ins on a Mac

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

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.

  1. Open the Office application and sideload your add-in.
  2. Open the add-in UI.
  3. 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.

  1. Reduce the size of the dialog.
  2. Choose Inspect Element, which opens in a new window.
  3. Resize the dialog to its original size.
  4. 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