SCRIPT DEBUG · Valkey

SCRIPT DEBUG

Sets the debug mode of server-side Lua scripts.

Usage

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 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 Introduction to Eval Scripts.

Reply

Simple string reply: OK.

Complexity

O(1)

ACL Categories

@scripting @slow

History

See also

EVAL, EVALSHA, EVALSHA_RO, EVAL_RO, FCALL, FCALL_RO, FUNCTION, FUNCTION DELETE, FUNCTION DUMP, FUNCTION FLUSH, FUNCTION HELP, FUNCTION KILL, FUNCTION LIST, FUNCTION LOAD, FUNCTION RESTORE, FUNCTION STATS, SCRIPT, SCRIPT EXISTS, SCRIPT FLUSH, SCRIPT HELP, SCRIPT KILL, SCRIPT LOAD, SCRIPT SHOW.