Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 3.04 KB

debug-ui-less.md

File metadata and controls

42 lines (26 loc) · 3.04 KB
title description ms.date ms.topic ms.localizationpriority
Debug function commands in Outlook add-ins
Learn how to debug function commands in Outlook add-ins.
07/11/2022
how-to
medium

Debug function commands in Outlook add-ins

Note

The technique in this article can be used only on a Windows development computer. If you're developing on a Mac, see Debug function commands.

This article describes how to use the Office Add-in Debugger Extension in Visual Studio Code to debug function commands. Function commands are initiated through an add-in command button on the ribbon. For more information about add-in commands, see Add-in commands.

This article assumes that you already have an add-in project that you'd like to debug. To create an add-in with a function command to practice debugging, follow the steps in Tutorial: Build a message compose Outlook add-in.

Mark your add-in for debugging

If you used the Yeoman generator for Office Add-ins to create your add-in project, skip to the Configure and run the debugger section later in this article. When you run npm start to build your add-in and start the local server, the command also sets the UseDirectDebugger value of the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\WEF\Developer\[Add-in ID] registry key to mark your add-in for debugging.

Otherwise, if you used another tool to create your add-in, perform the following steps.

  1. Navigate to the HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\WEF\Developer\[Add-in ID] registry key. Replace [Add-in ID] with the <Id> from your add-in's manifest.

    [!includeDeveloper registry key]

  2. Set the key's UseDirectDebugger value to 1.

Configure and run the debugger

Now that you've enabled debugging on your add-in, you're ready to configure and run the debugger. For instructions on how to do this, select one of the following options that applies to your webview control. For information about how to determine what webview control is used on your development computer, see Browsers and webview controls used by Office Add-ins.

See also