> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.latch.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging Nextflow

<Note>Available in `latch >= 2.53.8`</Note>

To enable developers to easily debug failed Nextflow workflows on Latch, the Latch SDK provides support
for inspecting the contents of an execution's work directory. This allows users to inspect/create/update
files in the work directory and relaunch the workflow using the updated state.

*Note: Once an execution's work directory has expired, it can no longer be inspected. See [Caching and Resuming](/workflows/sdk/nextflow/caching) for information
on how to extend the expiration of an execution's work directory.*

To get started, verify that you are using `latch >= 2.53.8`.

```bash theme={null}
latch --version
```

To debug an execution, run the following command:

```bash theme={null}
latch nextflow attach
```

This will prompt you to select the name of the execution you wish to debug:

<img src="https://mintcdn.com/latchbio/uN1BKX4g3v1ZQv8l/images/workflows/nextflow/nextflow-attach.png?fit=max&auto=format&n=uN1BKX4g3v1ZQv8l&q=85&s=899fdfdff16831ce1831c4f8828ba8d2" width="1233" height="185" data-path="images/workflows/nextflow/nextflow-attach.png" />

After selecting an execution, the Latch SDK will connect you to a container containing the contents of that execution's work directory.
The work directory is mounted under `/nf-workdir` inside the container. Once you are connected, you can inspect, create, and/or update
files. Any changes made inside the container will be reflected in the work directory of the execution.

<img src="https://mintcdn.com/latchbio/uN1BKX4g3v1ZQv8l/images/workflows/nextflow/nextflow-attach-2.png?fit=max&auto=format&n=uN1BKX4g3v1ZQv8l&q=85&s=ea7ef5c7b1bd90782281211f384a1c3e" width="957" height="191" data-path="images/workflows/nextflow/nextflow-attach-2.png" />
