How to debug Google Apps Script (aka where does Logger.log log to?)

前端 未结 12 1845
时光说笑
时光说笑 2020-12-12 11:25

In Google Sheets, you can add some scripting functionality. I\'m adding something for the onEdit event, but I can\'t tell if it\'s working. As far as I can tell

12条回答
  •  被撕碎了的回忆
    2020-12-12 11:46

    A little hacky, but I created an array called "console", and anytime I wanted to output to console I pushed to the array. Then whenever I wanted to see the actual output, I just returned console instead of whatever I was returning before.

        //return 'console' //uncomment to output console
        return "actual output";
    }
    

提交回复
热议问题