0

I am exploring the office-js API. https://learn.microsoft.com/en-us/office/dev/add-ins/excel/custom-functions-debugging outlines that for a shared js browser runtime logs or stack traces should be explorable from the browser developer tools.

However, for me this is not the case.

to demonstrate:

/**
 * Calculates the volume of a sphere.
 * @customfunction
 * @param {number} radius
 * @returns The volume of the sphere.
 */
function sphereVolume(radius) {
  console.log('*** called here ***');

  return (Math.pow(radius, 3) * 4 * Math.PI) / 3;
}

one of the default examples (running either in scriptlab or the yeoman yo office scaffolded project) has been modified for some logging statements:

console.log('*** called here ***');

however, even though the function correctly returns back the computed value to the UI I am unable to find the logs in any console.

Where are these logs hidden? How can I find these (if not in the developer`s toolbar/console?

edit

a shared runtime is requested

<Requirements>
    <Sets DefaultMinVersion="1.1">
      <Set Name="SharedRuntime" MinVersion="1.1"/>
    </Sets>
  </Requirements>
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292

0 Answers0