7

I am starting to appreciate the debugging features in the google app script editing environment, however I notice that I don't seem to be able to select client side javascript functions to debug in html pages, as shown in this imageunable to select javascript functions in html pages in google app script editing environment

Is there any way round this? At the moment I guess I'm just going to hack and watch error messages ...

Sam Joseph
  • 4,584
  • 4
  • 31
  • 47
  • oh, yes, and I know I can use the chrome debugging environment - maybe that's the only way to go for client side javascript ... – Sam Joseph Jan 16 '13 at 09:44
  • ah, hmm, but then the client side script is all rewritten so that's not so good ... – Sam Joseph Jan 16 '13 at 09:59
  • I wish there was an active google app script irc or skype chat room, the ones here seem dead: http://productforums.google.com/forum/#!topic/apps-script/ZF0F_3pFtGM – Sam Joseph Jan 16 '13 at 10:23
  • and this doesn't help: https://developers.google.com/apps-script/html_service?hl=en#DebuggingTemplates – Sam Joseph Jan 16 '13 at 10:25
  • 1
    They really ought to emblazen a warning about this atop the Google scripts home page to forewarn prospective adopters of this impending peril. And that you can't embed a script-produced page inside anything or make an asynchronous call to the same script because of cross site limitations and how the page is served in the cloud. – Dan Cancro May 08 '16 at 02:39

2 Answers2

6

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.

Arun Nagarajan
  • 5,547
  • 1
  • 22
  • 19
  • is there a way to disable (for dev purpose) the Caja sanitization & minification process so that we can at least see where our code fails instead of dummy userCodeAppPanel references to null code ? – thedrs Apr 20 '22 at 08:52
  • I think it is Closure now instead of Caja... – thedrs Apr 20 '22 at 09:46
0

Sometimes you can embed alerts in the javascript in your HTML page served from Google app script but sometimes the alerts do not show up. I have no idea why. When they work they are great. I have never seen any output from Logger.log or console.log statements inside the javascript.

aNewb
  • 188
  • 1
  • 12