none
How to debug (obtain diagnostic logs from) an Excel (desktop) task pane app without Visual Studio? RRS feed

  • Question

  • My hypothetical scenario is that my task pane app gets distributed via the Office Store, or a corporate Sharepoint site to 100 users using Excel 2013 (desktop, not Excel Online).  The app works great for 99 of them but has issues for one. Of course, I can't recreate the issues in my dev environment. What I'd like to be able to do is to have the user with the issues enable and capture some diagnostic information about how the app has been (mis)behaving in order to help me remotely diagnose and resolve the customer's issue.

    If this app were running in Excel Online in MSIE, I guess I could sprinkle console.log() statements through my app to write diagnostic information to the MSIE console and then have the end-user use the F12 tools to capture that output (and send it to my support team).

    What are my options for doing something similar for my app running in Excel 2013 (desktop) where the end-user does not have Visual Studio available?

    Thanks for any ideas.


    Shaun Logan - Oracle


    • Edited by Shaun Logan Wednesday, October 28, 2015 12:23 PM clarified that the "issue" is hypothetical
    Tuesday, October 27, 2015 10:36 PM

Answers

  • Hi Shaun Logan,

    Sorry for the confusion. 

    Did you mean that you want to store the diagnostic information when users using the Office add-ins? If I understood correctly, we can using JavaScript API for Office that store data as name/value pairs in a property bag stored in a location that depends on add-in type. You can get more detail about it from link below:

    Persisting add-in state and settings

    If I understood, please feel free to let us know.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Shaun Logan Friday, October 30, 2015 3:37 PM
    Friday, October 30, 2015 7:32 AM
    Moderator

All replies

  • Hi Shaun Logan,

    >>The app works great for 99 of them but has issues for one. Of course, I can't recreate the issues in my dev environment<<

    What kind of issue did you mean? Is there any error message? If the Office add-in could work in the development machine, it seems the issue is relative to the code or device environment. You can get more detail about requirements for running Office add-ins from link below:
    Requirements for running Office Add-ins

    And for the code environment, you may need to hand the exception or check the input values in the custom function.

    >>What are my options for doing something similar for my app running in Excel 2013 (desktop) where the end-user does not have Visual Studio available?<<

    We can include an HTML element to show the message. For example, here is the code that writes to a div with id='message' on the page for your reference:

    // Function that writes to a div with id='message' on the page.
    function write(message){
        document.getElementById('message').innerText += message; 
    }
    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, October 28, 2015 6:58 AM
    Moderator
  • Thanks for the reply.  To clarify, my "scenario" is somewhat hypothetical - there is no specific known issue with my app (still in development) at this time. I am looking for a way to build in a mechanism into the app to gather diagnostic information should such an issue arise.  The mechanism you suggest: writing to an HTML div element is fine for sample apps, but does not allow ongoing logging of diagnostic information. My end-users could be working with the app for a long period of time performing many UI gestures and business operations.  I am looking for some kind of "flight data recorder" mechanism so that when an issue arises, I not only capture the specific error message, but also what UI gestures took place as well as other app state.

    The console.log() approach is one example but AFAIK, does not help in a Task Pane app in (desktop) Excel 2013. By way of another example, in a C# VSTO add-in, we can use .NET APIs (eg. System.Diagnostics.TraceSource) to write diagnostic info to various trace sources (eg. log file).  I am looking for an analogous solution for my Office Add-in, esp. when run in a task pane from desktop Excel 2013.

    My original question still stands. Perhaps other app developers that have shipped "real" apps to customers have faced a similar issue: how to gather diagnostic info from end-users?


    Shaun Logan - Oracle

    Wednesday, October 28, 2015 12:22 PM
  • Hi Shaun Logan,

    Sorry for the confusion. 

    Did you mean that you want to store the diagnostic information when users using the Office add-ins? If I understood correctly, we can using JavaScript API for Office that store data as name/value pairs in a property bag stored in a location that depends on add-in type. You can get more detail about it from link below:

    Persisting add-in state and settings

    If I understood, please feel free to let us know.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Shaun Logan Friday, October 30, 2015 3:37 PM
    Friday, October 30, 2015 7:32 AM
    Moderator
  • Thanks Fei. Writing the diagnostic/log info to Settings seems reasonable (provided it fits in the 2MB limit, along with any other Settings my app needs).

    I asked a follow up question here


    Shaun Logan - Oracle

    Friday, October 30, 2015 3:45 PM