# libtmux.Pane.break_pane

- **Module:** libtmux.Pane
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/036c521c4b83ce6e434eb50afe2a0d08a6a05e46/src/libtmux/pane.py#L2441
- **Page:** https://libtmux.org/reference/py/libtmux-pane-break_pane/

```
libtmux.Pane.break_pane(self, detach: bool = True, window_name: str | None = None) -> Window
```

Break this pane out into a new window via ``$ tmux break-pane``.

## Parameters

- `self`
- `detach` (bool) — Do not switch to the new window (``-d`` flag), default True.
- `window_name` (str | None) — Name for the new window (``-n`` flag).

## Returns

:class:`Window`
    The newly created window containing the pane.

## Example

```python
>>> pane_to_break = window.split(shell='sleep 1m')
>>> new_window = pane_to_break.break_pane(window_name='broken')
>>> new_window.window_name
'broken'
```
