# Debug
<span class="source-link">[[Source]](src/debug/debug.md#L24)</span>

This is a debug only print utility.


```pony
primitive val Debug
```

## Constructors

### create
<span class="source-link">[[Source]](src/debug/debug.md#L24)</span>


```pony
new val create()
: Debug val^
```

#### Returns

* [Debug](debug-Debug) val^

---

## Public Functions

### apply
<span class="source-link">[[Source]](src/debug/debug.md#L28)</span>


If platform is debug configured, print either a single stringable or a
sequence of stringables. The default separator is ", ", and the default
output stream is stdout.


```pony
fun box apply(
  msg: (Stringable box | ReadSeq[Stringable box] box),
  sep: String val = seq,
  stream: (DebugOut val | DebugErr val) = seq)
: None val
```
#### Parameters

*   msg: ([Stringable](builtin-Stringable) box | [ReadSeq](builtin-ReadSeq)\[[Stringable](builtin-Stringable) box\] box)
*   sep: [String](builtin-String) val = seq
*   stream: ([DebugOut](debug-DebugOut) val | [DebugErr](debug-DebugErr) val) = seq

#### Returns

* [None](builtin-None) val

---

### out
<span class="source-link">[[Source]](src/debug/debug.md#L47)</span>


If platform is debug configured, print message to standard output


```pony
fun box out(
  msg: Stringable box = seq)
: None val
```
#### Parameters

*   msg: [Stringable](builtin-Stringable) box = seq

#### Returns

* [None](builtin-None) val

---

### err
<span class="source-link">[[Source]](src/debug/debug.md#L53)</span>


If platform is debug configured, print message to standard error


```pony
fun box err(
  msg: Stringable box = seq)
: None val
```
#### Parameters

*   msg: [Stringable](builtin-Stringable) box = seq

#### Returns

* [None](builtin-None) val

---

### eq
<span class="source-link">[[Source]](src/debug/debug.md#L28)</span>


```pony
fun box eq(
  that: Debug val)
: Bool val
```
#### Parameters

*   that: [Debug](debug-Debug) val

#### Returns

* [Bool](builtin-Bool) val

---

### ne
<span class="source-link">[[Source]](src/debug/debug.md#L28)</span>


```pony
fun box ne(
  that: Debug val)
: Bool val
```
#### Parameters

*   that: [Debug](debug-Debug) val

#### Returns

* [Bool](builtin-Bool) val

---

## Private Functions

### _print
<span class="source-link">[[Source]](src/debug/debug.md#L59)</span>


```pony
fun box _print(
  msg: String val,
  stream: (DebugOut val | DebugErr val))
: None val
```
#### Parameters

*   msg: [String](builtin-String) val
*   stream: ([DebugOut](debug-DebugOut) val | [DebugErr](debug-DebugErr) val)

#### Returns

* [None](builtin-None) val

---

### _stream
<span class="source-link">[[Source]](src/debug/debug.md#L64)</span>


```pony
fun box _stream(
  stream: (DebugOut val | DebugErr val))
: Pointer[U8 val] ref
```
#### Parameters

*   stream: ([DebugOut](debug-DebugOut) val | [DebugErr](debug-DebugErr) val)

#### Returns

* [Pointer](builtin-Pointer)\[[U8](builtin-U8) val\] ref

---

