Debugger Hangs in Google Doc Function

4.3k Views Asked by At

I'm trying to debug a function in some app script for my Google spreadsheet. When I choose my function (called Calc) from the drop down and hit the Bug icon to step through it, all I get is a message at the top of the IDE saying "Preparing for execution...". Is there something else I'm supposed to do?

BTW - I thought of posting this on the google forums but I noticed that all the support team for app script seem to weigh in here. Hope this is the right place!

2

There are 2 best solutions below

1
On

Your loops are not setup correctly.

They must be:

Line 13 for (c=8; c <= lastCol; c++)
Line 16 for (r=4; r <= lastRow; r++)
2
On

Line 13 is wrong. See the order in for loop. Will never stop as is.