# Troubleshooting

Start with the visible message, then check the log when you need more detail.

## Open the log

Press **F12** to open or close the log.

You can also run these commands from the command palette:

- `log:open` opens the log.
- `log:open-last-error` opens it at the newest error.

Startup errors normally open the relevant log entry automatically.

## A file will not open

Check that:

1. The path still exists.
2. Your account can read the file.
3. A network share or WSL distribution is available.
4. The file is not a broken link or protected system file.

Browser navigation continues when a file is unreadable. *Lx* shows an empty read-only preview and a short warning.

## A network or WSL path fails

Keep the complete UNC prefix:

```text
\\server\share
```

For WSL, use:

```text
\\wsl.localhost\DistroName\path
\\wsl$\DistroName\path
```

Do not remove one of the leading backslashes.

## Text looks broken

The file may use the wrong codepage.

Run `doc:set-codepage`, or reopen it with:

```cli
lx --codepage cp437 file.txt
```

See [Text encodings and codepages](encodings.md).

## The wrong viewer opens

First check the selected format in the status bar.

Run `doc:set-format` if the format is wrong. For a lasting fix, use `config.extension_overrides`, `config.filename_overrides`, `config.format_modes`, or `config.format_handlers`.

See [Opening files](opening_files.md) and [Special viewers](special_viewers.md).

## A preview is missing

Preview safely falls back to a read-only view when no preview handler is available.

Check the log for a plugin error if the file normally has a preview.

## A command-line option is rejected

Open the built-in [Command Line](cli.md) guide:

```cli
lx --help
```

The same help page opens with `-h`, `-?`, or `/?`.

## A plugin fails

The remaining plugins still load.

Open the newest error in the log and note:

- The plugin name
- The first clear error message
- The file and line shown with it

Correct the plugin or restore a known-good copy, then restart *Lx*.

## Before reporting a problem

Include:

- What you expected
- What happened instead
- The shortest steps that reproduce it
- The affected filename or format
- The useful part of the latest log entry

Do not include private file contents unless they are needed and safe to share.
