I have an excel addin which opens a dialog. How do I see the logs from the .html page or JS code that actually calls .displayDialogAsync to show the dialog?
For instance, I have a MyFunctions.html file, with following code (example)
<script>
console.log("Running the Script"); // <------ HOW TO LOG THIS
window.Offce.onReady(function(officeEvent){
console.log("OfficeJS is ready"); // <------ AND HOW TO LOG THIS?
window.displayDialog = function(event) {
console.log("The button to show dialog was clicked");
Office.context.ui.displayDialogAsync(....{...});
}
}
</script>
How do I log and view the above 2 console statements? The first one - happens before Office JS is loaded - how/where to log and view it? I say so cos sometimes OfficeJS doesn't load properly or something is wrong, I want to see /log the issue.
And the second log statement - where do I see that too?
I could 'log to the excel sheet itself' however that doesn't help, cos what if there's an issue loading the Addin itself preventing the above from running
Hopefully all this makes sense.
I really want control to step by step debug the above code. I jsut cannot because above is not even visible when running Excel. The above html is only visible in a browser, which isn't help cos the addin doesn't run inside a browser, it runs in Excel.