# SCRIPT DEBUG

> Choose the debug mode for scripts; HotKV supports only NO.

URL: https://docs.hotkv.com/commands/script-debug/

```
SCRIPT DEBUG YES | SYNC | NO
```

- Group: Scripting and functions
- Complexity: O(1)
- HotKV Cloud: all plans
- On-Premise: no license needed

`SCRIPT DEBUG` exists so that tools which set the script debug mode keep
working. HotKV has no Lua script debugger, so `NO` (scripts run normally) is
the only mode: it is accepted and changes nothing. `YES` and `SYNC` are
refused. To debug a script, log from it with `redis.log()` or return
intermediate values.

## Return value

| Case | RESP2 | RESP3 |
| --- | --- | --- |
| `NO` | Simple string `OK` | Simple string `OK` |
| `YES` or `SYNC` | Error `ERR the Lua debugger is not supported by this server` | Error |
| Any other mode | Error `ERR Use SCRIPT DEBUG YES/SYNC/NO` | Error |

## Examples

```
127.0.0.1:6379> SCRIPT DEBUG NO
OK
127.0.0.1:6379> SCRIPT DEBUG YES
(error) ERR the Lua debugger is not supported by this server
```

## Compatibility

Redis 7 and Valkey 8 start an interactive Lua debugger with `YES` or `SYNC`.
HotKV does not have one and refuses those modes.

## See also

[SCRIPT](https://docs.hotkv.com/commands/script/index.md), [EVAL](https://docs.hotkv.com/commands/eval/index.md)