# console

Prints logs to the debugging console. The "console" is a global object and can be accessed directly. In the WeChat app, logs are output to vConsole.

# Methods

# console.debug()

Prints the "debug" log to the debugging panel.

# console.log()

Prints the "log" log to the debugging panel.

# console.info()

Prints the "info" log to the debugging panel.

# console.warn()

Prints the "warn" log to the debugging panel.

# console.error()

Prints the "error" log to the debugging panel.

# console.group(string label)

Creates a new group in the debugging panel. An indent is added to subsequently output content to indicate that it belongs to the current group. Grouping is completed after console.groupEnd is called.

# console.groupEnd()

Ends a group created by console.group.

# Notes

  • Since the features of the vConsole are limited and the support for console methods varies with different versions of apps, we recommend that developers only use the methods provided in this document in their Mini Programs.
  • For the display restrictions on certain content, see debugging.