How to Debug Google Apps Script

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024
  • How to Debug Google Apps Script when your code is failing? Learn how find the error in your code in this tutorial video.
    #GoogleAppsScript #HowToDebugGoogleAppsScript #GoogleAppsScriptTutorial
    -----
    saperis - Helping you become a Google Workspace!
    If you're interested in leveling up your Google Apps Script skill have a look at my online cours: https//courses.saperis.io
    Sign up to our RUclips channel for more Google Workspace, Gmail, Google Docs, Google Drive, etc. videos: / @saperis
    saperis website: saperis.io/
    saperis Linkedin: / saperis
    saperis Twitter: / saperis_io

Комментарии • 39

  • @peterfenner6163
    @peterfenner6163 3 года назад +4

    Tried to figure out App Scripts debugging off and on for weeks - in 15 minutes you made it obvious. Thanks

    • @saperis
      @saperis  3 года назад +1

      Happy to hear that Peter! Google has announced a new Script Editor. From the screenshots I've seen it should give even more debugging options.

  • @leebecker8255
    @leebecker8255 4 года назад +3

    I think the term "debugging" is a historical term from when computers were the size of a room, and programs were punch cards that were physically fed into the computer. There was a time when something didn't work and it turned out there was an insect inside it somewhere? Hence debugging :)

    • @saperis
      @saperis  4 года назад +1

      Yes, that's the same story I heard. From that time on trying to find the error was called "debugging".

    • @catman72
      @catman72 3 года назад +3

      Bugs not only interrupted punched cards, they also got burned on hot components and made those components warm up even worse.
      Also - and thats a verified story - they would get into the old huge hard-drives ( the ones that looked like washing machines) and get smeared on the fast rotating disks 😬

  • @LeslieWigdor
    @LeslieWigdor Год назад

    I began coding in 1964, the dawn of the computer era. My first computer was made with vacuum tubes. The generation of computers before that were made with relay mechanical switches. In the computer room you could hear the clickity-click of all the relays switching on or off. One day the computer stopped giving the correct answer. It was determined that a moth got caught in one of the relays. Since that time if anything didn't work you had to see if you had another bug in the system. True story.

    • @saperis
      @saperis  Год назад

      And "bug" it has been called ever since. 🐞

  • @julianvarga
    @julianvarga 4 года назад

    I'm interested in learning more about web apps using apps scripts. I really like your videos

    • @saperis
      @saperis  4 года назад +2

      Hi Julian. Thank you very much! I'll keep on creating Google Apps Script videos. - Chanel

  • @DiaborMagics
    @DiaborMagics 22 дня назад

    I dont know if things simply changed in 2024, but I dont get all the windows at the bottom for the debugger. All I get is a panel at the right-hand side that says "variables" and it shows my variables with an arrow to expand, but expanding them only shows me the functions I can use on them. Expanding such a function will NOT show me any useful information. They all show length 0, name "", arguments null and caller null. For every single variable and every single function I have checked. You'd think that it would show the value in getValue, but no.
    I'm trying to script for the first time, all good tutorials are from years ago and I'm at my wit's end because my debugger doesn't look anywhere close to what the videos show 😢
    I know a bit of Java so I'm figuring some simple things out at I go (and for those things the debugger also doesn't show anything useful), but just a tad more advanced is already not working, likely because I just dont know the correct functions/methods and perhaps syntax, I mean its a different language. But the debugger should help me figure out what DOES go right and where it goes wrong, so that I can properly look that up.... except it doesnt.

  • @edu_aqui
    @edu_aqui 2 года назад +1

    Would be great if, in debuging mode, we could point to a variable in the screen and it shows its content instantly, like in Visual Basic IDE. Or we have a screen area where we can fill the variable name and press enter to reveal its content, like occurs in ABAP IDE.

    • @saperis
      @saperis  2 года назад

      Yes, that would be nice.

  • @heidisimon1686
    @heidisimon1686 3 года назад

    Your explanations are excellent!

    • @saperis
      @saperis  3 года назад

      Glad you like them! I thinks it's important that we as educators don't only show but also explain. 😀

  • @santoshkumar-fv3xb
    @santoshkumar-fv3xb 2 года назад

    Zooming of code recording may make this video amazing

    • @saperis
      @saperis  2 года назад

      Thanks for the hint.

  • @fahad-cs305
    @fahad-cs305 3 года назад

    useful - helpful ....thank you so much

    • @saperis
      @saperis  3 года назад

      Glad it was helpful! 😀

  • @friendsofthelibrary6292
    @friendsofthelibrary6292 2 года назад

    I am using Google Sheets and am trying to debug my script to add 10 lines at a time in a growing activity table. The scrip that is made available to me doesn not have the view option shown in your You Tube video.

    • @saperis
      @saperis  2 года назад

      This video was made with the old script editor. It has since been updated.
      If you want to learn how to debug or check your code, have a look at this video: ruclips.net/video/L4V15ZxIjBQ/видео.html

  • @AlberichRheinmann
    @AlberichRheinmann 6 месяцев назад

    good morning ... my most appreciate teacher ... 😊 it is hard to find in the web .... but how can i debug functions ... with input parameters, variables that come automated ?

    • @saperis
      @saperis  4 месяца назад

      Check out this video: ruclips.net/video/L4V15ZxIjBQ/видео.html

    • @AlberichRheinmann
      @AlberichRheinmann 4 месяца назад

      @@saperis hy madame ... my Chanel No. 1. Meanwhile i had a thousands of problems to solve. One of my biggest one was ... writing a file ( or copy a file via appscript ) lasts about 7 seconds ( till the file is really written on the servers harddisk ), i had to read again this written file ( and had to stop the program for 7 seconds ). awesome .. in my 40 years of programming experience i never had problems like these. and so on and so on ...
      Another one is, that it takes too much time to write rows to a sheet. i cannot use the appsheet database ( main reason is, that i cannot correspond with appscript with the appsheet database ... ) 1 million tears i cried ... maybe there were 2 millions 😢 )
      And you ... yes you my best teacher ... you helped me in so many ways ... without you ( it is not to imagine ) i would stay at the beginning of my appsheet and appscript world. Thanks a thousand times ... 🌺❤️🌺 keep cold and warm ( as it is the best for you at any time ) .. and last but not least ... please forgive my jungle english 😎

  • @jorgev4656
    @jorgev4656 3 года назад

    Thanks a lot. i've been working on google apps script but i could not find the way to debug.

    • @saperis
      @saperis  3 года назад

      Glad to help Jorge. By the way you might want to check out my Google Apps Script course I'll be soon launching: courses.saperis.io/

  • @emmanuelblehoue8532
    @emmanuelblehoue8532 3 года назад +1

    what's about bug form conversion vba to apps scripts ?

    • @saperis
      @saperis  3 года назад +1

      Good question...haven't tried the conversion tool out yet.

  • @leebecker8255
    @leebecker8255 4 года назад

    Acutally though I came across your video because I'm having trouble debugging. For some reason I can't expand the plus signs at the bottom where the locals and globals window is. I can expand the local one, but I can't expand anything under that. Have you come across this before? Thanks! I love your methodica clear explanations.

    • @saperis
      @saperis  4 года назад

      I've had this same behavior like you mentioned two days ago while I was debugging a script. It's either a bug or they've changed the functionality of the debugging mode. Here someone reported the same problem on Stackoverflow: stackoverflow.com/questions/63082546/apps-script-not-expand-global-variables-in-debug-mode
      Greetings, Chanel

    • @leebecker8255
      @leebecker8255 4 года назад

      @@saperis Ah ha!! Thank you! So it is not something I'm doing wrong.

  • @shillcoin9898
    @shillcoin9898 2 года назад

    how would you debug if your function takes an argument? You cannot simply "run" since it won't know what value(s) are inputtet, right? 🤔

    • @saperis
      @saperis  2 года назад

      Even if your function uses an argument you can debug. You could also log the argument to the console before you pass it into the function.

  • @fttx6673
    @fttx6673 3 года назад

    Can we create a website with google apps scrpt linked with google sheets ..
    . The student can enter his personal number, which is in the first column in advance, and to match the number, the rest of the column values appear on the web page or site ..
    .... I would like to do it with google apps scrpt and google sheets

    • @saperis
      @saperis  3 года назад

      Yes, you can publish websites with Apps Scripts of publish a Google Sheets file as a website.
      Since we have no experience with such tasks please refer to the official Google Apps Script documentation: developers.google.com/apps-script/reference

  • @menachemavitan4340
    @menachemavitan4340 2 года назад

    If anyone knows how to update an existing form, I would appreciate guidance

    • @saperis
      @saperis  2 года назад

      Have a look at the documentation for Forms to see what's possible: developers.google.com/apps-script/reference/forms

  • @kulvinder8211
    @kulvinder8211 3 года назад

    debuging

    • @saperis
      @saperis  3 года назад

      I made a second video where I show how to debug with the new Script Editor (IDE): ruclips.net/video/L4V15ZxIjBQ/видео.html