title: How to debug a standalone GAS script?
body: <p>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).</p>
  
  <p>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 <code>_</code>), they're exposed to a Sheets add-on; however, if they are private, they can't be selected as a debug entry point!</p>
  
  <p><a href="https://developers.google.com/apps-script/guides/support/troubleshooting#using_the_debugger_and_breakpoints" rel="nofollow noreferrer">The official doc</a> doesn't acknowledge this problem. <a href="https://stackoverflow.com/questions/16089041/how-can-i-test-a-trigger-function-in-gas/16089067#16089067">This wonderful answer</a> does not apply, since you can't access <code>SpreadsheetApp</code> while debugging a <em>standalone</em> 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).</p>
  
  <p>In short, <strong>how can I set up an environment that lets me toggle a breakpoint, press "Debug", and step through code as needed?</strong></p>