# Server.capture(_:includingHistory:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/PaneInteraction.swift#L89
- **Page:** https://libtmux.org/reference/swift/server-capture(_-includinghistory-)/

```
Server.capture(_:includingHistory:)(pane: Pane, includingHistory: Bool) -> [String]
```

The pane's visible contents, one line per row. The source read is capped at 1 MiB; use incremental capture for a large scrollback instead of collecting its entire history.

- Parameters:
  - pane: the pane to read.
  - includingHistory: reads the scrollback too, from its start.

## Raises

- `TmuxError`
