7

I am trying to create an Excel AddIn with JavaScript API. But I don't understand where "console.log" outputs their messages. All Microsoft documentations are full with console.log examples, but it is not explained where console.log() outputs the messages. I have found a similar post on stackoverflow, but these refer to visual studio console log. I am writing my AddIn with nodeJs on Mac, so a solution for visual studio is no option for me.

I have searched the web. I have searched through all Excel options. I have also searched through the Excel Developer tab, but I can't find anything.

I am using Office 2016 (up to date) on Mac. My AddIn is coded with jQuery.

Has anyone an idea?

EDIT

I have created my ExcelAddin in NodeJS. Therefore I have installed yo and office-generator npm install -g yo generator-office . Then I have ran the command yo office and selected jQuery as library. The sample AddIn works.

csskevin
  • 383
  • 2
  • 14
  • Did you manage to make it work? – Chris Dec 04 '19 at 18:52
  • I'm afraid not. There is no documentation at all. – csskevin Dec 05 '19 at 19:56
  • 1
    I just found the solution. You can install the Microsoft Edge DevTools Preview via the Microsoft Store now. There you can attach to the console output. – Chris Dec 05 '19 at 21:43
  • [Łukasz Zadworny](https://stackoverflow.com/users/15062168) wrote an [Answer](https://stackoverflow.com/a/66079730) saying "https://learn.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-developer-tools-on-windows-10 this is solution to problem..." – Scratte Feb 08 '21 at 05:29

1 Answers1

5

defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true

After entering that ^ in a terminal, when you right click your add-in, you'll have the option to Inspect Element (aka Safari Web Inspector). The console tab will show all the logged messages from console.log() statments.

Caitlin Smith
  • 66
  • 1
  • 2
  • Thanks. How did you find this solution? – csskevin Feb 28 '20 at 07:48
  • This solution can be found in the **Debug Office Add-ins on a Mac** documentation https://learn.microsoft.com/en-us/office/dev/add-ins/testing/debug-office-add-ins-on-ipad-and-mac – John Lay Aug 10 '20 at 10:35