# Troubleshoot a workspace

Source: https://libtmux.org/en/csharp/latest/workspace/guides/troubleshooting/

> Find the failed stage before retrying a workspace operation.

Start with the error message and exit status. A partially completed load can
leave sessions or windows running; inspect its result before retrying or
cleaning up.

## Confirm the command and input

```console
$ tmux-workspace debug-info --json
```

Check the executable version, selected tmux binary and workspace directories.
Use an explicit file path to bypass saved-name lookup. Verify the socket matches
the one used for inspection and capture.

## Common failures

| Symptom | Next check |
| --- | --- |
| Workspace not found | Explicit path, file extension and global discovery directory |
| Unsupported field | CLI configuration fields and the reported field path |
| tmux unavailable | Executable path, permissions and selected socket |
| Existing session mismatch | Running window names and the requested document |
| Layout rejected | Layout name, pane capacity and the selected tmux version |
| File already exists | Select a new output path or authorize replacement with `--force` |
| Script failed | Child status, captured output and working directory |
| Interactive context required | Use `load -d` for automation; provide a terminal for interactive work |

## Record a load

Continue the [installation walkthrough](https://libtmux.org/en/csharp/latest/workspace/guides/installation/) and append diagnostic
records to a local file:

```console
$ tmux-workspace --log-level debug load \
    -S "$WORKSPACE_TMP/tmux.sock" \
    -d \
    --json \
    --log-file workspace-load.log \
    workspace.yaml
```

Logs may include script output and local paths. Inspect them before sharing a
bug report. Include the command, versions, minimal configuration, exit status
and relevant result; remove private values.

[CLI source](https://github.com/libtmux/libtmux-dotnet/blob/f77fe776ba67a04abb20ddbbc26cf4a000d63b74/src/LibTmux.Workspace.Cli/README.md).
