Skip to content

DebugController.enable method

DebugController › enable

Enable specific debug namespaces. Note that explicitly disabled namespaces (prefixed with '-') will remain disabled.

Signature:

enable(namespaces: string | string[]): void

Parameters:

ParameterTypeDescription
namespacesstring | string[]Single namespace string or array of namespace strings to enable

Returns: void

Example:

window.DEBUG.enable('foo-bar'); // show all debug messages from the `foo-bar` plugin
window.DEBUG.enable('foo-bar:obsidian-dev-utils:*'); // show all debug messages from the `obsidian-dev-utils` library within the `foo-bar` plugin
window.DEBUG.enable('foo-bar:*'); // show all debug messages from the `foo-bar` plugin and its submodules
window.DEBUG.enable('*:obsidian-dev-utils:*'); // show all debug messages for the `obsidian-dev-utils` library within any plugin
window.DEBUG.enable(['foo-bar', 'baz-qux']); // enable multiple namespaces
window.DEBUG.enable('foo-bar,baz-qux'); // enable multiple namespaces using comma-separated string
window.DEBUG.enable('*'); // show all debug messages