慕姐4208626
调试事件对象带着堆栈驱动测井谷歌应用程序脚本。在脚本编辑器的菜单栏中,goto:View > Stackdriver Logging查看或流日志。sole.log()会写DEBUG级别消息例onEdit():function onEdit (e) {
var debug_e = {
authMode: e.authMode,
range: e.range.getA1Notation(),
source: e.source.getId(),
user: e.user,
value: e.value,
oldValue: e. oldValue }
console.log({message: 'onEdit() Event Object', eventObject: debug_e});}例onFormSubmit():function onFormSubmit (e) {
var debug_e = {
authMode: e.authMode,
namedValues: e.namedValues,
range: e.range.getA1Notation(),
value: e.value }
console.log({message: 'onFormSubmit() Event Object', eventObject: debug_e});}例onChange():function onChange (e) {
var debug_e = {
authMode: e.authMode,
changeType: changeType,
user: e.user }
console.log({message: 'onChange() Event Object', eventObject: debug_e});}然后检查StackdrierUI标记为message字符串以查看输出。