Home > rc-js-util > _Debug
Utilities for debug builds.
Signature:
export declare class _Debug
Property | Modifiers | Type | Description |
---|---|---|---|
label | static |
string | undefined |
Method | Modifiers | Description |
---|---|---|
applyLabel(this, label, callback) | static |
|
assert(this, condition, errorMessage) | static |
Throws an Error with the given message if the condition is false. |
breakpoint(this) | static |
Used in place of debugger statements when writing libraries. Should generally not be used directly. |
conditionalBlock(flag, cb) | static |
Convenience method to run multiple asserts if flag set. |
configureBreakpoint(this, onBreakpoint) | static |
Most debuggers will ignore debugger statements in node_modules. Skirt around this by letting the consumer set their own callback for this. |
error(this, message) | static |
Throws an Error with the given message. |
getStackTrace(this) | static |
|
isFlagSet(this, flag) | static |
Used to get debug flags in an environment independent way. |
runBlock(this, cb) | static |
Convenience method to run multiple asserts. |
setFlag(this, flag, value) | static |
Used to set debug flags in an environment independent way. |
verboseLog(this, message, ancillaryObject) | static |
Logging which can be conditionally enabled by setting DEBUG_VERBOSE to true. |