Skip to content

Console Debugger

The Console Debugger is a public interface for the Web SDK. This service prints out events being tracked by the Web SDK at real time and exposes Web SDK functionality to the user. The main purpose of this tool is for easier verification and increased confidence that Orbee's Web SDK is functioning as expected.

Installation

The Console Debugger is accessible to all scripts by default. However, you must enable it by running orb.bootloader.config('console-debug', true) to start viewing events and interacting with the Web SDK.

Enable the Console Debugger

orb.bootloader.config("console-debug", true);

Once enabled you will be able to access all of the Console Debugger's features through our oalog interface

oalog.ConsoleDebugger;

Configuration

This script has no public configuration available.

Methods

This service has the following available public methods:

They MUST BE called with oalog.ConsoleDebugger

Note

ALL methods that allow you to pass in a single scope/namespace name or a list of scope/namespace names to target specifically will behave in the following manner:

  1. If specific values for scopes and namespaces are provided, results will show ONLY for those specified values.

  2. If only a scope name(s) is supplied but namespace(s) is not supplied, results will show for specified scope(s) and ALL namespaces within those scopes.

  3. If only a namespace name(s) is supplied but scope(s) is not supplied, results will show for specific namespace(s) and ALL scopes that contain those namespaces.

  4. If neither are supplied, results will show for ALL scopes and/or namespaces.

getState

getState ( ): { installed: boolean, enabled: Record<string, State> }

Reference to:
State

Gets the state of the console debugger (installed or not) as well the current page state for ALL scopes.

commandGuide

commandGuide ( scopes: string | string[], namespaces: string | string[] ): void

Shows commonly used commands that you can copy and paste into your console to get desired information.

Parameter Type Required Description
scopes string or string[] no Desired scope or list of scope names to show commandGuide for
namespaces string or string[] no Desired namespace or list of namespace names to show commandGuide for

events

events ( scopes: string | string[], namespaces: string | string[] ): void

Shows all events that were tracked since page load.

Parameter Type Required Description
scopes string or string[] no Desired scope or list of scope names to show all events for
namespaces string or string[] no Desired namespace or list of namespace names to show all events for

metadata

metadata ( scopes: string | string[], namespaces: string | string[] ): void

Shows information regarding the installed TMS script, bootloader, namespace and enabled plugins.

Parameter Type Required Description
scopes string or string[] no Desired scope or list of scope names to show metadata for
namespaces string or string[] no Desired namespace or list of namespace names to show metadata for

showConsoleOutput

showConsoleOutput ( scopes: string | string[], namespaces: string | string[] ): void

Enable console logging (enabled by default).

Parameter Type Required Description
scopes string or string[] no Desired scope or list of scope names to enable console logging for
namespaces string or string[] no Desired namespace or list of namespace names to enable console logging for

hideConsoleOutput

hideConsoleOutput ( scopes: string | string[], namespaces: string | string[] ): void

Disable console logging.

Parameter Type Required Description
scopes string or string[] no Desired scope or list of scope names to disable console logging for
namespaces string or string[] no Desired namespace or list of namespace names to disable console logging for

showViewedVehicles

showViewedVehicles ( scopes: string | string[], namespaces: string | string[] ): void

Show current visitor's viewed vehicles

Parameter Type Required Description
scopes string or string[] no Desired scope or list of scope names to show viewed vehicles for
namespaces string or string[] no Desired namespace or list of namespace names to show viewed vehicles for

showFavoritedVehicles

showFavoritedVehicles ( scopes: string | string[], namespaces: string | string[] ): void

Show current visitor's viewed vehicles

Parameter Type Required Description
scopes string or string[] no Desired scope or list of scope names to show favorited vehicles for
namespaces string or string[] no Desired namespace or list of namespace names to show favorited vehicles for

Last update: 2023-04-13