DebugController
Controls debug output by managing debug namespaces. Exposed globally as window.DEBUG.
Debug settings persist across plugin reloads in localStorage.
Import:
import type { DebugController } from '@mnaoumov/typescript-lib/debug-controller';Example:
- `lorem:*` matches all submodules of 'lorem'- `*:ipsum` matches all plugins' `ipsum` submodules- `*` matches everything
Special syntax:- Namespaces prefixed with '-' are explicitly disabled- Multiple namespaces can be combined with commas: `lorem,-lorem:ipsum,dolor:*`Signature:
export interface DebugControllerProperties
| Property | Type | Description |
|---|---|---|
| disable | (namespaces: string | string[]) => void | Disable specific debug namespaces. Disabled namespaces take precedence over enabled ones when there's a conflict. |
| enable | (namespaces: string | string[]) => void | Enable specific debug namespaces. Note that explicitly disabled namespaces (prefixed with '-') will remain disabled. |
| get | () => string[] | Get currently configured debug namespaces. |
| set | (namespaces: string | string[]) => void | Set debug namespaces, replacing all previous configurations. |
Links to this page: