0

I'm grappling with the issue of how to debug a standalone GAS script (in this case, one to be used as a Sheets add-on).

There is no debug configuration. I can use parameter-less entry points creating mock objects to debug functions app-agnostically, but this is all published in the release package. Also, if these functions are not private (i.e. not ending in _), they're exposed to a Sheets add-on; however, if they are private, they can't be selected as a debug entry point!

The official doc doesn't acknowledge this problem. This wonderful answer does not apply, since you can't access SpreadsheetApp while debugging a standalone script rather than a bound script (and it doesn't fix the above problem of the function being exposed as a custom function to Sheets).

In short, how can I set up an environment that lets me toggle a breakpoint, press "Debug", and step through code as needed?

tehhowch
  • 9,645
  • 4
  • 24
  • 42

0 Answers0