Print or alert?

Viewing 2 reply threads
  • Author
    Posts
  • April 19, 2023 at 12:43 PM #49356

    robinsiebler
    Participant

    I am trying to debug a script. How can I print or show an alert?

    April 20, 2023 at 9:11 AM #49357

    Daniel Leu
    Participant

    You can use console.log() to output variables and text to the console:

    console.log(var);
    console.log("text");

    Depending on the object, you might want to use console.log(JSON.stringify(var)).

    To create an alert, use Utils.alertWithMessage('Script Run Complete!', 'Cool!!!!!');

    Hope this helps!

    April 20, 2023 at 11:14 AM #49358

    robinsiebler
    Participant

    Thanks! That worked like a charm!

Viewing 2 reply threads

You must be logged in to reply to this topic.