If you already write Apps Script add-ons, you’ll know that debugging can be a little challenging, and although you can use the developer tools in chrome on a running add-on, breakpoints don’t persist between sessions and it can be hard to relate what you wrote with what you see in the tools.
Office online.Office is much better in that respect if you are running Office online. There’s a much closer correlation between what you can see in the tools and what you wrote. It makes sense, because your app is being served up directly, whereas in Apps Script it’s been constructed by HtmlService.
Local OfficeIt’s quite an achievement that local versions of Office – which are native Apps – can run add-ins at all, but remarkably they can. It took me a while to figure out how to test an add-in locally. In the online mode, you insert your add-in then upload the manifest, which describes where your app is being hosted (amongst many other XML type complicated things). If you are not too embedded in the Microsoft universe and don’t have Sharepoint, you can host your manifest file on a network share, and tell Excel (and other Office apps), that this network share hosts manifests. First of all, copy your manifest file to this network share (I wasn’t able to point to it locally, I had to put it on a share) In Excel Options, go to the trust center/Settings
In Trusted add-in catalogs, add the share address (you need to put file:// in front of it, and tick show in Menu.
and there you’ll see the manifests for any add-ins you’ve put there.
What’s more, you can refresh it if you change the hosted code by right clicking on the add-on and choosing reload.
I’ve no idea which browser is used behind the scenes to render the app in the sidebar, but it’s not chrome and it’s not a modern IE, since there are some html5 things that don’t exist in that browser, but that work just fine when running in Office online mode. What’s more, try to use them and it fails silently and mysteriously, so just because it works fine in Office online, doesn’t mean its going to work locally.
The debuggerAt this point I thought I was screwed, but then I came across this Windows 10 component – f12Chooser.exe
- Chord Snip
- Color Arranger
- Dicers Pro and advanced features
- Measure round trip and execution time from add-ons
- Merging slide templates with tabular data
- Office Add-ins – first attempt
- Orchestrating competing google and Office framework loads
- Plotting maps with overlays Sheets add-on starter
- Promise implementation for Apps Script Stripe payments
- Repeatable add-on settings layouts and style
- Sheets API – Developer Metadata
- SlidesMerge add-on
- Unpicking the Google Picker
- Watching for changes in an Office add-in
- When test add-ons doesn’t work
- Sankey Snip