When using a getter function the GAS Editor debugging will fail with We're sorry, a server error occurred. The script will run as expected.
Steps to reproduce:
Clone the app-script-starter repo
Add a class with getter function
class Fail {
constructor() {
this.log = ['a', 'b', 'c'];
}
get latest() {
return this.log[this.log.length - 1];
}
}
global.failDebugger = () => {
const f = new Fail();
Logger.log(Fail: ${f.latest});
};
3. Debug `failDebugger` from GAS Editor
Expected result:
- be able to debug
Actual result:
- debugger fails w/ `We're sorry, a server error occurred`
Few notes:
- actually it is not needed the functionality `Fail` to be used for the debugger to fail
- the starter we where using was inspired (creative copy/paste) from Atlassian [Gmail Addon](https://medium.com/@jsarafajr/google-apps-script-without-pain-or-success-story-of-atlassian-cloud-for-gmail-6cd99ba40de0)
When using a getter function the GAS Editor debugging will fail with
We're sorry, a server error occurred
. The script will run as expected.Steps to reproduce:
app-script-starter
repoAdd a class with getter function
global.failDebugger = () => { const f = new Fail(); Logger.log(
Fail: ${f.latest}
); };