console
Console output for debugging
Logging. Messages appear in the script console.
Methods
console.log(value)Prints to the console.
- value Any required
Any number of values. Each one becomes a string and they are joined with a space. An object prints as [object Object], so pass JSON.stringify(value) to see inside one.
console.warn(value)Prints to the console as a warning.
- value Any required
Any number of values. Each one becomes a string and they are joined with a space. An object prints as [object Object], so pass JSON.stringify(value) to see inside one.
console.error(value)Prints to the console as an error.
- value Any required
Any number of values. Each one becomes a string and they are joined with a space. An object prints as [object Object], so pass JSON.stringify(value) to see inside one.
Examples
Debugging a run
console.log("family: " + Widget.currentFamily);
console.warn("no data, falling back");
console.error("gave up");
// Output shows in the editor's console. Errors carry the line
// and column they came from. Tap one to jump there.