# DebugProfilerTarget

> Accumulates the profiler messages dispatched to targets in memory for the current request.

[API reference](/docs/api/index.md) › [Yii3 Debug](/docs/extensions/yii3-debug/reference/index.md) › [Profiling](/docs/extensions/yii3-debug/reference/profiling/index.md) › DebugProfilerTarget

| final class | `Yii3\Debug\Profiling\DebugProfilerTarget` |
| --- | --- |
| Extends | `Yiisoft\Profiler\Target\AbstractTarget` |
| Source | [`src/Profiling/DebugProfilerTarget.php`](https://github.com/yii3/debug/blob/main/src/Profiling/DebugProfilerTarget.php#L16) |

Accumulates the profiler messages dispatched to targets in memory for the current request.

`Yiisoft\Profiler\Profiler::flush()` moves its messages out before dispatching them, so a flush performed while the
capture is still deferred would otherwise leave the Profiling panel empty.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`export()`](#method-export) | Accumulates the exported messages, so every flush of the request reaches the capture. | `DebugProfilerTarget` |
| [`messages()`](#method-messages) | Returns the messages accumulated for the current request. | `DebugProfilerTarget` |
| [`reset()`](#method-reset) | Clears the messages accumulated for the previous request. | `DebugProfilerTarget` |

## Method details

### export() <span id="method-export"></span>

```php
public function export(Yiisoft\Profiler\Message[] $messages): void
```

Accumulates the exported messages, so every flush of the request reaches the capture.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$messages` | `Yiisoft\Profiler\Message[]` | Profiling messages exported by the profiler. |

### messages() <span id="method-messages"></span>

```php
public function messages(): list<Yiisoft\Profiler\Message>
```

Returns the messages accumulated for the current request.

**Returns**

`list<Yiisoft\Profiler\Message>`: Messages accumulated in export order.

### reset() <span id="method-reset"></span>

```php
public function reset(): void
```

Clears the messages accumulated for the previous request.