HOW TO: Debug Office Add-in In Office Clients without Visual Studio

Todd Baginski

by Todd Baginski on 11/11/2015

Share this:

Article Details

Date Revised:

Applies to:
debugging, Office add-in, Visual Studio

If you have ever developed an Office Add-in with Visual Studio, you are familiar with pressing F5 to run your Office Add-in and debug the code in it. When you take this approach, Visual Studio opens the Office client program associated with your Office Add-in and automatically loads your Add-in into the Office client program. Then, all you do is set breakpoints in your code and debug your code. Easy peasy, as my son would say.

However, what about if you don’t have Visual Studio installed? How can you debug the Office Add-in?

Your first option is to load the Office Add-in in an Office web client and use F12 to debug it from Internet Explorer, or to use the debugger that comes with other web browsers. This works, but it does have a couple of downsides, such as:

  • You might need to debug the Office client application on the PC because you are targeting specific versions of Office clients on the PC.
  • You might observe the Office Add-in behaving differently in an Office client application versus an Office web client.

The other option is one I learned from Rolando Jimenez Salgado at the Microsoft MVP Summit last week. I just tried this option out and it works AWESOME. So awesome that I thought I should quickly write up how to do it and share it with all the Office developers on our wonderful planet.

  1. First, fire up an Office client application on your PC. In this example, I am using Excel.
  2. Next, on the Insert tab in the Ribbon, click the Add-ins button (figure 1) and load an Add-in from the Store or your Add-in Catalog.
Inserting an Add-in that we'll debug from the Office Store in Excel 2013 Figure 1: You can load an Add-in from the Insert tab on the Office Ribbon.
  1. In this example, I clicked the Store button and the first Add-in I saw in the list (figure 2) was one written by Rolando himself, so I loaded it.
Selecting the Bubbles app from the Office store to debug Figure 2: Selecting the Bubbles Add-in from the Store.
  1. Next, open the F12Chooser application that comes with Windows. There are two versions of this application. Use the version of the F12Chooser that matches the version of the Office client application you are running.

32-bit – C:\Windows\System32\F12\F12Chooser.exe
64-bit – C:\Windows\SysWOW64\F12\F12Chooser.exe

  1. In this example, I am running the 32-bit version of Office 2013 Professional Plus, so I ran C:\Windows\System32\F12\F12Chooser.exe.
  2. After you open the F12 Chooser program, select the application that you would like to debug. In this example (figure 3), I chose the website where the Bubbles Office Add-in (that Rolando wrote) runs. If you are writing your own Office Add-in then select the website that correlates to where you have the Add-in deployed. This could be a localhost URL.
Choosing a target to debug Figure 3: Choosing a target application to debug.
  1. As soon as you click the target to debug, the F12 debugger loads. In figure 4 you can see the F12 Debugging application loaded and attached to the Bubbles Office Add-in.
Running the F12 Debugger application from Office 2013 against an Office Add-in Figure 4: Running the F12 Debugger application from Office 2013 against an Office Add-in.
  1. To test it out, I created a Data Table in my Excel document, and then set a breakpoint in the ExcelBubbles.js file that is part of the Bubbles Add-in. Then I clicked the bubble that says Select Table (figure 5) and the breakpoint I set in ExcelBubbles.js was hit (figure 6).
Creating a quick data table in Excel and adding a breakpoint for when a user clicks Select Table Figure 5: Inserting a simple data table in the Excel document. Hitting the breakpoint we added to the ExcelBubbles.js file that is part of the Bubbles Add-in. Figure 6: Hitting the breakpoint in the Bubbles Add-in.


Thanks, Rolando!

You can learn more about the F12Chooser app at this link.


You can view Todd’s original blog here:

Topic: Development

Sign in with

Or register