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.

5
  • 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. Commented Aug 19, 2014 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? Commented Aug 19, 2014 at 19:43
  • I didn't know about the click and drag possibility, thanks it helps a lot. Commented Aug 20, 2014 at 9: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 Commented Aug 20, 2014 at 10:03
  • Have you looked at the answers to existing questions like yours? Commented May 9, 2016 at 14:03

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.