1

so I have an excel add-in that's a task pane with a few custom functions thrown in. I have debugging set up in my local excel 365 installation through the Edge DevTools (As per this guide: https://learn.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-developer-tools-on-windows-10#debug-using-microsoft-edge-devtools). I've also edited my manifest to use a shared runtime, as per this guide: https://learn.microsoft.com/en-us/office/dev/add-ins/excel/configure-your-add-in-to-use-a-shared-runtime

The problem is I still don't have access to my custom functions in the debugger, as far as I can tell. At the very least, my debugger can't find the functions.js/ts file. Maybe I've missed something obvious, but I don't see anything in the documentation that actually explains how to attach a debugger to a custom function in a shared runtime.

Any help would be much appreciated.

1 Answer 1

1

Have you included your functions.js in your taskpane.html? To have your custom functions work in shared runtime and debug them, you must include your functions.js in your html file.

Sign up to request clarification or add additional context in comments.

5 Comments

I had not, Thanks! So, I'm now seeing my functions file in the debugger, but my breakpoints aren't being hit. My sourcemaps are being generated correctly, so I'm not sure what I'm missing.
Still unable to get this to work. I've also unchecked "Disable script debugging" in Windows' internet options and tried debugger; statements. No dice.I've changed up the logic of the custom functions to rule out caching, so I'm not sure what the problem could be.
Does this happen to all other regular functions of the page, or just happens to custom functions?
This only seems to happen with my custom functions. I'm able to set and hit breakpoints in my taskpane.ts, so no problems there. However, after modifying my webpack config to include my custom functions in taskpane.html, I am able to see my functions.ts file in the debugger and set breakpoints, but those breakpoints aren't being hit, they just get skipped over as though they weren't there. The same thing happens to debugger; statements, they just seem to get skipped. The custom functions are running as expected other than that, though.
As an update: I've discovered that breakpoints/debugger statements work if I sideload my add in to excel on the web and use my browser's debugger. However, I still can't get them to work using Edge DevTools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.