1

I have some questions regarding debugging UiApps using Google Apps Script editor.

I know you can debug by using the debug button and execute code step by step. But this ia only useful as long as no Ui should appear : you cannot debug a webapp this way.
Does anyone know how to debug efficiently?
Does anyone know an external debugger that is more suited for this task?

Currently I try to debug the old fashion way by adding statements that will log data into a file (spreadsheet). But to me this seems to be about 25 years back in time. So i'm curious how other people try to debug using the script debugger or an alternative.

Another simple question is about the find+replace dialog.
It is very basic (not even taking lower / upper case into account while searching etc), but the main problem with it is that you can't move it and it covers a big space of the window, hiding code you want to view after searching.
So I would like to know if it can be (re)moved or replaced or ... (whatever that makes it easier to debug).

Also interesting to me is if addons exist that can be installed and make debugging easier.

Rubén
  • 34,714
  • 9
  • 70
  • 166
SoftwareTester
  • 1,048
  • 1
  • 10
  • 25
  • 1
    It is possible to move the Replace dialog box. Make sure the mouse pointer is over the **Find and replace** heading, . . . click and drag. That's one feature I'd like to see Google improve. – Alan Wells Aug 19 '14 at 19:37
  • You can run your app, just like the user would; all the code will run, and for debugging a `.gs` code file, you can add `Logger.log();` statements, then view the output of the statement(s) by showing the Logging Output window by using the VIEW, LOGS menu. Also, errors are shown in the VIEW, EXECUTION Transcript window. Or are you looking for something else? – Alan Wells Aug 19 '14 at 19:43
  • I didn't know about the click and drag possibility, thanks it helps a lot. – SoftwareTester Aug 20 '14 at 09:56
  • As Logger.log only shows the LAST script, I use Betterlog for storage into a spreadsheet. Of course I also look at the execution transcript. SOMETIMES this provides info about what line execution fails, but usually it doesn't help and I only see a messagebox with something like 'some kind of error ocurred' . Not much helpful. Using try-catch also is a possibility, but that changes the code as well, something I would like to avoid if anyway possible. So, indeed I'm looking for possibilities of the debugger I don't know about or (prefereable) a better debugger and development environment – SoftwareTester Aug 20 '14 at 10:03
  • Have you looked at the answers to [existing questions like yours](http://stackoverflow.com/search?q=[google-apps-script]+how+to+debug)? – Mogsdad May 09 '16 at 14:03

0 Answers0