---
name: "diag_captureFrameToFile"
type: command
status: ok
groups: ["Diagnostic", "Performance Profiling"]
arma3_since: "1.16"
branch: "diag prof"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/diag_captureFrameToFile
revid: 318853
updated: 2022-05-13T09:21:56Z
---

# diag_captureFrameToFile

*Command · Diagnostic, Performance Profiling · Arma 3 v1.16 · branch: diag prof*

## Description

This command starts counting frames from the moment it is executed and when the count reaches the number passed as param, the current frame is captured and
written to a log file in the same directory as the .rpt file.

The full Path to the log file is logged to simultaneously.

The data in the log file can be copied and pasted into the [diag_captureFrame](../commands/diag_captureFrame.md) UI dialog to get a visualisation later on.

## Syntax

```sqf
diag_captureFrameToFile frame
```

**Parameters:**

- `frame`: [Number](../topics/Number.md) - next n-th frame to be captured

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
diag_captureFrameToFile 1; //capture the first frame after command execution
```

### Example 2

```sqf
diag_captureFrameToFile 24; //capture 24th frame after command execution
```

## See also

Performance Profiling · [diag_captureSlowFrame](../commands/diag_captureSlowFrame.md) · diag logSlowFrame · [diag_captureFrame](../commands/diag_captureFrame.md) · [logEntities](../commands/logEntities.md) · [exportJIPMessages](../commands/exportJIPMessages.md)

<sub>Source: [BI Community Wiki — diag captureFrameToFile](https://community.bistudio.com/wiki/diag_captureFrameToFile) (revision 318853).</sub>
