log
  • 28 Oct 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

log

  • Dark
    Light
  • PDF

Article summary

Description

Displays a value in the debugger output log.


Input Parameters

NameTypeRequiredDescription
valueAnyYesValue to display in output log
[prop]TextNoWhen value is an array, name of property to display for each item in the array

Returns

No return value.


Examples

// display a basic message in the debugger
debug.log("Hello, world");
// display runtime information in the debugger
var name = runtime.name;
var version = runtime.version;
debug.log(name + " v." + version);
// prepare array of person objects
var people = [
    { "name": "Ethan", "age": 16 },
    { "name": "Annabelle", "age": 18 }];

// display the names of each person in the debugger
debug.log(people, "name");

Remarks

This function is useful throughout script development because it allows you to display information and test variable conditions during script executions.


What's Next