Implementation:SeleniumHQ Selenium Closure Debug
| Knowledge Sources | |
|---|---|
| Domains | JavaScript_Atoms, Vendored_Library |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Vendored Google Closure Library module providing logging and debugging utilities used by Selenium JavaScript atoms.
Description
goog.debug is a vendored copy of the Google Closure Library module. It provides logging and debugging utilities including error catching, object inspection/exposure, error normalization and enhancement, and stack trace generation. It supports configurable logging enablement and sloppy stack building modes. Selenium uses this as part of its JavaScript atom infrastructure for browser automation commands.
Usage
This module is consumed internally by Selenium's JavaScript atoms build system. It is not imported directly by end users.
Code Reference
Source Location
- Repository: SeleniumHQ_Selenium
- File: third_party/closure/goog/debug/debug.js
- Lines: 1-749
Key Exports
goog.provide('goog.debug');
goog.debug.LOGGING_ENABLED
goog.debug.FORCE_SLOPPY_STACKS
// Key exported functions:
goog.debug.catchErrors(logFunc, opt_cancel, opt_target)
goog.debug.expose(obj, opt_showFn)
goog.debug.deepExpose(obj, opt_showFn)
goog.debug.exposeArray(arr)
goog.debug.normalizeErrorObject(err)
goog.debug.enhanceError(err, opt_message)
goog.debug.enhanceErrorWithContext(err, opt_context)
goog.debug.getStacktraceSimple(opt_depth)