Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Phone API Reference - Extended - util.debug

util.debug

Description

Prints the supplied message to the standard output.  Use the App Development web page for your phone to view the output from debugging. For debugging objects, use the JSON.stringify function. 

Basic Example: 

var testString = "Test Test";
util.debug(testString); // "Test Test";
  
var test = {};
util.debug(test); // "[object Object]";
util.debug(JSON.stringify(test)); // "{}"

Parameters

Name

Required

Type

Default

Description

message

Yes

string

Message to be displayed.

indent

No

integer

0

Number of tab stops to indent the message.

Examples

util.debug to print Hello World

util.debug('Hello World');

  • No labels