script-debug.3valkey - Man Page

Sets the debug mode of server-side Lua scripts.

Synopsis

SCRIPT DEBUG <YES | SYNC | NO>

Description

Set the debug mode for subsequent scripts executed with EVAL. Valkey includes a complete Lua debugger, codename LDB, that can be used to make the task of writing complex scripts much simpler. In debug mode Valkey acts as a remote debugging server and a client, such as valkey-cli, can execute scripts step by step, set breakpoints, inspect variables and more - for additional information about LDB refer to the valkey-ldb(7) Valkey Lua debugger page.

Important note: avoid debugging Lua scripts using your Valkey production server. Use a development server instead.

LDB can be enabled in one of two modes: asynchronous or synchronous. In asynchronous mode the server creates a forked debugging session that does not block and all changes to the data are rolled back after the session finishes, so debugging can be restarted using the same initial state. The alternative synchronous debug mode blocks the server while the debugging session is active and retains all changes to the data set once it ends.

For more information about EVAL scripts please refer to valkey-eval-intro(7) Introduction to Eval Scripts.

Reply

valkey-protocol(7) Simple string reply: OK.

Complexity

O(1)

Acl Categories

@scripting @slow

History

See Also

eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-delete(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-restore(3valkey), function-stats(3valkey), script(3valkey), script-exists(3valkey), script-flush(3valkey), script-help(3valkey), script-kill(3valkey), script-load(3valkey), script-show(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual