Google Apps Script API
    Preparing search index...

    Interface Console

    The console object provides access to the debugging console (e.g., the Web console in Firefox).

    MDN Reference

    interface Console {
        assert(condition?: boolean, ...data: any[]): void;
        clear(): void;
        count(label?: string): void;
        countReset(label?: string): void;
        debug(...data: any[]): void;
        dir(item?: any, options?: any): void;
        dirxml(...data: any[]): void;
        error(...data: any[]): void;
        error(): void;
        error(formatOrObject: string | object, ...values: any[]): void;
        group(...data: any[]): void;
        groupCollapsed(...data: any[]): void;
        groupEnd(): void;
        info(...data: any[]): void;
        info(): void;
        info(formatOrObject: string | object, ...values: any[]): void;
        log(...data: any[]): void;
        log(): void;
        log(formatOrObject: string | object, ...values: any[]): void;
        table(tabularData?: any, properties?: string[]): void;
        time(label?: string): void;
        time(label: string): void;
        timeEnd(label?: string): void;
        timeEnd(label: string): void;
        timeLog(label?: string, ...data: any[]): void;
        timeStamp(label?: string): void;
        trace(...data: any[]): void;
        warn(...data: any[]): void;
        warn(): void;
        warn(formatOrObject: string | object, ...values: any[]): void;
    }
    Index

    Methods

    • The console.assert() static method writes an error message to the console if the assertion is false.

      MDN Reference

      Parameters

      • Optionalcondition: boolean
      • ...data: any[]

      Returns void

    • The console.clear() static method clears the console if possible.

      MDN Reference

      Returns void

    • The console.count() static method logs the number of times that this particular call to count() has been called.

      MDN Reference

      Parameters

      • Optionallabel: string

      Returns void

    • The console.countReset() static method resets counter used with console/count_static.

      MDN Reference

      Parameters

      • Optionallabel: string

      Returns void

    • The console.debug() static method outputs a message to the console at the 'debug' log level.

      MDN Reference

      Parameters

      • ...data: any[]

      Returns void

    • The console.dir() static method displays a list of the properties of the specified JavaScript object.

      MDN Reference

      Parameters

      • Optionalitem: any
      • Optionaloptions: any

      Returns void

    • The console.dirxml() static method displays an interactive tree of the descendant elements of the specified XML/HTML element.

      MDN Reference

      Parameters

      • ...data: any[]

      Returns void

    • The console.group() static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console/groupEnd_static is called.

      MDN Reference

      Parameters

      • ...data: any[]

      Returns void

    • The console.groupCollapsed() static method creates a new inline group in the console.

      MDN Reference

      Parameters

      • ...data: any[]

      Returns void

    • The console.groupEnd() static method exits the current inline group in the console.

      MDN Reference

      Returns void

    • The console.table() static method displays tabular data as a table.

      MDN Reference

      Parameters

      • OptionaltabularData: any
      • Optionalproperties: string[]

      Returns void

    • The console.timeLog() static method logs the current value of a timer that was previously started by calling console/time_static.

      MDN Reference

      Parameters

      • Optionallabel: string
      • ...data: any[]

      Returns void

    • Parameters

      • Optionallabel: string

      Returns void

    • The console.trace() static method outputs a stack trace to the console.

      MDN Reference

      Parameters

      • ...data: any[]

      Returns void