Join Scott Simpson for an in-depth discussion in this video Logging and debugging your app, part of Learning Google Apps Script.
You can think of logger.log as console.log,…except it goes to the Apps Script log…rather than the browser console.…I'll click the left gutter here at the assignment of k,…and I'll click on the bug icon to start…running while debugging.…Notice that the tool bar changes to your…standard debug options.…Continue, pause, stop,…and over here step in, step over, and step out.…After that are some options to show inheritance…and to show all values, which gives you a…little more information than you might…want for basic troubleshooting.…
As with many desktop IDEs,…as you click through the current line's highlighted.…And you can see the current value of variables…
First, learn how to use simple scripts to edit documents and spreadsheets, work with files in Drive, and find and send messages in Gmail. Then find out how to add custom functionality to your spreadsheets, and build user interface elements for your scripts, using menus, alerts, and dialogs. Finally, Scott shows how to share your work with others by publishing scripts as web apps.
- What is Google Apps Script?
- Understanding script types
- Logging and debugging your scripts
- Scripting common tasks
- Building custom spreadsheet functions
- Creating add-on functionality such as dialogs and sidebars
- Sharing your script as a web app