rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
320 lines (141 loc) • 3.77 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [\_Debug](./rc-js-util._debug.md)
## \_Debug class
Utilities for debug builds.
**Signature:**
```typescript
export declare class _Debug
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[label](./rc-js-util._debug.label.md)
</td><td>
`static`
</td><td>
string \| undefined
</td><td>
</td></tr>
</tbody></table>
## Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[applyLabel(this, label, callback)](./rc-js-util._debug.applylabel.md)
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
[assert(this, condition, errorMessage)](./rc-js-util._debug.assert.md)
</td><td>
`static`
</td><td>
Throws an `Error` with the given message if the condition is false.
</td></tr>
<tr><td>
[breakpoint(this)](./rc-js-util._debug.breakpoint.md)
</td><td>
`static`
</td><td>
Used in place of `debugger` statements when writing libraries. Should generally not be used directly.
</td></tr>
<tr><td>
[conditionalBlock(flag, cb)](./rc-js-util._debug.conditionalblock.md)
</td><td>
`static`
</td><td>
Convenience method to run multiple asserts if flag set.
</td></tr>
<tr><td>
[configureBreakpoint(this, onBreakpoint)](./rc-js-util._debug.configurebreakpoint.md)
</td><td>
`static`
</td><td>
Most debuggers will ignore `debugger` statements in node\_modules. Skirt around this by letting the consumer set their own callback for this.
</td></tr>
<tr><td>
[error(this, message)](./rc-js-util._debug.error.md)
</td><td>
`static`
</td><td>
Throws an `Error` with the given message.
</td></tr>
<tr><td>
[getStackTrace(this)](./rc-js-util._debug.getstacktrace.md)
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
[getTags()](./rc-js-util._debug.gettags.md)
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
[isFlagSet(this, flag)](./rc-js-util._debug.isflagset.md)
</td><td>
`static`
</td><td>
Used to get debug flags in an environment independent way.
</td></tr>
<tr><td>
[labelBlock(this, label)](./rc-js-util._debug.labelblock.md)
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
[logError(this, message)](./rc-js-util._debug.logerror.md)
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
[runBlock(this, cb)](./rc-js-util._debug.runblock.md)
</td><td>
`static`
</td><td>
Convenience method to run multiple asserts.
</td></tr>
<tr><td>
[setDisabledLoggingTags(this, tags)](./rc-js-util._debug.setdisabledloggingtags.md)
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
[setEnabledLoggingTags(this, tags)](./rc-js-util._debug.setenabledloggingtags.md)
</td><td>
`static`
</td><td>
</td></tr>
<tr><td>
[setFlag(this, flag, value)](./rc-js-util._debug.setflag.md)
</td><td>
`static`
</td><td>
Used to set debug flags in an environment independent way.
</td></tr>
<tr><td>
[verboseLog(this, tags, message, ancillaryObject)](./rc-js-util._debug.verboselog.md)
</td><td>
`static`
</td><td>
Logging which can be conditionally enabled by setting either `VERBOSE` to true on build options (enabling everything), or by calling setLoggingTags and specifying which tags you'd like enabled.
</td></tr>
</tbody></table>