简体   繁体   English

从 Google Apps 脚本调试客户端代码

[英]Debugging client side code from Google Apps Script

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.我的客户端代码有问题(谁没有,他们在开发过程中的某个时间点或其他时间用任何语言编写的任何代码?)问题是我在 Google Apps Script 中编写此代码,并且找不到我正在尝试调试/检查错误的 js 代码。 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:我尝试了一下,这就是我得到的结果:

这到底是什么?!

(I think Caja might have something to do with this...) (我想 Caja 可能与此有关...)

I think it's in some VM**** file, but I don't know much about that.我认为它在某个 VM**** 文件中,但我对此知之甚少。 How to access that JavaScript code to set some breakpoints?!如何访问该 JavaScript 代码以设置一些断点?!

From answer to how can I debug client side javascript (in html pages) in google appscripts回答如何在 google appscripts 中调试客户端 javascript(在 html 页面中)

Unfortunately, there is no other good way to debug client side web UI other than with console logs.不幸的是,除了使用控制台日志之外,没有其他好的方法来调试客户端 Web UI。 As you noted the JavaScript/DOM is re-written so you can't use standard Chrome debug tools.正如您所指出的,JavaScript/DOM 已重新编写,因此您无法使用标准的 Chrome 调试工具。

Because of the above, consider using the approach suggested by Mogsdad on Did you know?由于上述原因,请考虑使用 Mogsdad 在您知道吗? (You can log to a spreadsheet from client JavaScript!) : Write debugging logs to a spreadsheet. (您可以从客户端 JavaScript 记录到电子表格!) :将调试日志写入电子表格。

'debugger' 怎么样?写在代码里

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Google Apps 脚本中从服务器到客户端进行通信 - Communicate from server to client side in Google Apps script 具有 Google Apps 脚本值的服务器端和客户端通信函数 - Server Side and Client Side communications Functions with values at Google Apps Script 如何从Google Apps脚本中的二进制字符串(客户端隐藏的表单字段)重构图像的Blob - How to reconstruct a blob for an image from a binary string (client side hidden form field) in Google Apps Script 从客户端发送到Google Apps脚本(服务器)base64字符串 - send from client side to google apps script (server) base64 string 使用Google Apps脚本将数组传递给客户端功能? - Passing an array to client side function using Google apps script? Datetime 似乎破坏了 Google Apps Script 客户端反序列化 - Datetime seems to break Google Apps Script client-side deserialization 在Google Apps脚本中从服务器端(.gs)传递到客户端(html)时,已知类型的变量变为“未定义” - Variable of known type becomes “undefined” when passed from server side (.gs) to client-side(html) in Google Apps Script 如何将服务器端数据存储到Google Apps脚本中的客户端变量? - How to store server side data to client side variable in Google Apps Script? 调试JS文件 - 客户端代码 - debugging JS file - Client Side code 我可以使用一个ID作为变量,并在调用客户端函数时遇到问题吗?google-apps-script - Can I have an id that is a variable and having trouble with calling client side function… google-apps-script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM