I have noticed that GAS's debugger cannot handle breakpoints in callback functions. This simple script works fine if run, but if a breakpoint is set at the line return element
, the debugger throws an error This operation is not supported from a callback function.
Here is the test function:
function callbackTest() {
var myArray = [1,2,3];
var output = myArray.map(function(a){
return a;
});
Logger.log(output);
}
This also fails if a breakpoint is put at the same place:
function callbackTest() {
var myArray = [1,2,3];
var output = myArray.map(testFunc);
Logger.log(output);
}
function testFunc(a) {
return a;
}
I had a question a few days ago about the GAS debugger, but this doesn't seem (to me) to be related. Please feel free to demonstrate that I am wrong!