Skip to content

DebugController.enable

DebugController › enable

Type: (namespaces: string | string[]) => void

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

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 `@mnaoumov/obsidian-lib` within the `foo-bar` plugin (it keeps its legacy `obsidian-dev-utils` namespace)
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 from `@mnaoumov/obsidian-lib` 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