从Google Apps脚本调试客户端代码 [英] Debugging client side code from Google Apps Script

查看:48
本文介绍了从Google Apps脚本调试客户端代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户端代码有问题(在开发过程中的某一时刻,他们用任何语言编写的任何代码都没有吗?)问题是我正在Google Apps中编写此代码脚本,找不到我要调试/检查错误的js代码.我记得能够输入一个函数名,然后单击返回的代码直接转到代码文件及其中的函数,但是由于某种原因,该文件在这里不起作用.我尝试了,这就是我要去做的:

I have issues with my client-side code (who doesn't, with any code they write in any language, at one point or another in the development process?) Problem is that I'm writing this code in Google Apps Script, and can't find the js code I am trying to debug/examine for errors. I remember being able to enter a function name, and then click on the returned code to go straight to the code file, and the function in it, but that, for some reason, isn't working here. I try it and this is what I get taken to:

(我认为Caja可能与此有关...)

(I think Caja might have something to do with this...)

我认为它在某些VM ****文件中,但是我对此并不了解.如何访问该JavaScript代码以设置一些断点?!

I think it's in some VM**** file, but I don't know much about that. How to access that JavaScript code to set some breakpoints?!

推荐答案

答案

不幸的是,除了控制台日志外,没有其他调试客户端Web UI的好方法.如您所述,JavaScript/DOM被重写,因此您不能使用标准的Chrome调试工具.

Unfortunately, there is no other good way to debug client side web UI other than with console logs. As you noted the JavaScript/DOM is re-written so you can't use standard Chrome debug tools.

由于上述原因,请考虑使用Mogsdad在您知道吗?(您可以从客户端JavaScript登录到电子表格!):将调试日志写入电子表格.

Because of the above, consider using the approach suggested by Mogsdad on Did you know? (You can log to a spreadsheet from client JavaScript!): Write debugging logs to a spreadsheet.

这篇关于从Google Apps脚本调试客户端代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆