console object enables your add-on to log messages. If you have started
the host application for your add-on from the command line (for example, by
cfx run or
cfx test) then these messages appear in the command
shell you used. If the add-on has been installed in the host application, then
the messages appear in the host application's
console object has the following methods:
console.log(object[, object, ...])
Logs an informational message to the shell. Depending on the console's underlying implementation and user interface, you may be able to introspect into the properties of non-primitive objects that are logged.
console.info(object[, object, ...])
A synonym for
console.warn(object[, object, ...])
Logs a warning message.
console.error(object[, object, ...])
Logs an error message.
console.debug(object[, object, ...])
Logs a debug message.
Logs the given exception instance as an error, outputting information about the exception's stack traceback if one is available.
Logs a stack trace at the point this function is called.