Is it possible to debug UI-less button for Office Add-ins?
Asked Answered
L

1

7

I am trying to debug a UI-less button for an add-in for Outlook for Mac.

In my code, the UI-less function in function-file.js. This is included in function-file.html, which is set as the FunctionFile url in the xml manifest. I also have the UI-less function referenced by name in the xml manifest with the <Action xsi:type="ExecuteFunction"> tag. Lastly, I have vorlon set up for debugging using these instructions.

When I click on the UI-less button, a new client appears on Vorlon. However, I can't get information like I would from a usual debugger.

  • "Domain Explorer" and "Object Explorer" does not load most of the time; I see a spinning loading circle instead. When they do load, I am unable to expand the trees in "Domain Explorer" and "Object Explorer" -- doing that causes the tree to display a loading circle that never finishes.
  • "Office Addin" doesn't show anything.
  • Even the console is unresponsive: it does not accept commands or display anything (even console.log() statements).

In contrast, debugging a button that opens a screen works as expected; Domain Explorer, Object Explorer, Office Addin, and the console are all functional.

This leads me to think that by the time I see the client on Vorlon, the Javascript code (for the UI-less button) has finished executing and is no longer available for debugging. If that is correct, is it possible to debug a UI-less button for an Office add-in? If so, how?

Luckless answered 4/12, 2017 at 22:40 Comment(2)
Hi, I am facing the same problem; did you find out how to debug such functions? Thanks,Winner
any solution found?Watanabe
O
0

2 ways:-

  1. Load outlook inside a web browser (instead of the app), right-click, inspect, and load the console tab. Shows errors, output from your own script debug statements, etc.

  2. Create your own stub inside your code to HTTP post debug output to a remote web server, then "tail" your web server logs. (with some careful use of try/catch this will help show errors too)

Ozonize answered 27/1, 2022 at 8:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.