The debugger does not work with "This operation is not supported by the callback function."

I noticed that the GAS debugger cannot handle breakpoints in callback functions. This simple script works fine at startup, but if a breakpoint is set on the line return element, the debugger throws an error This operation is not supported from a callback function.Here is a test function:

function callbackTest() {

  var myArray = [1,2,3];

  var output = myArray.map(function(a){
    return a;
  });

  Logger.log(output);
}

This also fails if the breakpoint is placed in 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 does not seem (to me) in order to be related. Please feel free to demonstrate that I am wrong!

+4
source share

Source: https://habr.com/ru/post/1607733/


All Articles