I am developing a google editor add-on in google sheets.
New menu item, open side bar with server side code (.gs) html and js (.html)... that sorta thing.
My code is large and each time there is an exception, i get the annoying:
Uncaught SyntaxError: Unexpected identifier (at userCodeAppPanel:formatted:25:NaN)
kind of messages in my chrome dev panel console in run time.
When i click the
userCodeAppPanel link to find the location of the problem, it opens up an empty panel of code :
(even clicking the '{}' leaves it empty)
Now, from the many
stackoverflow posts on the subject, i understand my client side html+js is sanitized and minified by "Closure" (used to be Caja?) and merged into some google js envelope code and because of this nothing remains of the original code function names and rows.
All the posts say: use 'debugger' or use 'console.log()' and print the s**t out of every method to help understand where the problems are.
We are at year 2022, can't google just provide a closure.disableAll() kind of method for dev phase so that we can develop normally and see the actual js exception locations in our code?
I include knockout and other libs and my code is large and sometimes just including new scripts causes exception at unknown locations in hundreds of lines of code...i can't put console logs every 10 lines,
Any solution is welcome. Thanks !