Blog Archives

Debugging modern Office Add-ins with current tooling can be quite challenging. Although the technology of the add-ins you write is consistent and conforms to web standards (HTML, JavaScript, CSS), the way the add-in is hosted in the different Office clients makes it challenging to use debugging tools (as the add-in isn’t simply running in a web browser).

Debugging in Office Online (web browser versions of the Office products) is probably the simplest to use existing debug tools, and simply using F12 debug tools in IE, Edge, Chrome will give you access to the Console, DOM and inspection of HTML and CSS.

Desktop Office clients make it a bit harder since you can’t just start the F12 debugger tools because you are not in a full browser (like Edge or Chrome). Luckily Microsoft have provided a standalone version of the F12 tools (F12Chooser.exe) that you can use to attach to the running instance of the Desktop Office client.

Once you start talking about devices such as iPhones and iPads it begins to get even more difficult. Most documentation points you in the direction of Vorlon.JS which provides a good remote debugging experience, but involves a fair bit of setup, configuration and embedded scripts in your addin as well.

Rather than go down the Vorlon.JS route, I’ve come up with the a technique which is more lightweight than the Vorlon.JS approach and instead uses Firebug Lite. Firebug Lite is an in-page debugging tool that can be added to a webpage by embedded JavaScript into your add-in. The example below adds a hyperlink to the page that will launch the Firebug debugger when clicked.

This link now appears in the add-in and clicking on it starts the Firebug Lite debugger in-page. Due to the amount of screen space (especially on an iPhone) it’s going to be a fiddly trying to do extensive debugging using your finger. Having access to the JavaScript console is really valuable and it also shows the status of AJAX calls being made and any resulting errors.