Skip to content

getLibDebugger

Returns a debugger instance for the library (under its debug namespace, see Library.debugNamespace).

When the host supplied Library.debugNamespaceAliases, a filter written for an alias still shows the messages. Each message prints ONCE: under the current namespace when a filter enables it, otherwise under the first alias a filter enables. Printing under every enabled one would double each message under the most common filter of all, <prefix>*, which enables them all.

Import:

import { getLibDebugger } from '@mnaoumov/typescript-lib/debug';

Signature:

function getLibDebugger(namespace: string): debug.Debugger

Parameters:

Parameter Type Description
namespace string The namespace for the debugger instance.

Returns: debug.Debugger — A debugger instance for the library (under its debug namespace, see Library.debugNamespace).