SCRIPT DEBUG
SCRIPT DEBUG <YES | SYNC | NO>
- Available since:
- Redis Open Source 3.2.0
- Time complexity:
- O(1)
- ACL categories:
-
@slow,@scripting, - Compatibility:
- Redis Software and Redis Cloud compatibility
Set the debug mode for subsequent scripts executed with EVAL. Redis includes a
complete Lua debugger (LDB) that can be used to make the task of
writing complex scripts much simpler. In debug mode Redis acts as a remote
debugging server and a client, such as redis-cli, can execute scripts step by
step, set breakpoints, inspect variables, and more. For additional information
about LDB see the Redis Lua debugger page.
You can enable LDB in one of two modes: asynchronous or synchronous. In asynchronous mode, Redis creates a forked debugging session that does not block the server. Redis rolls back all data changes after the session ends, so you can restart debugging from the same initial state. In synchronous mode, Redis blocks the server while the debugging session is active and retains all data changes after the session ends.
For more information about EVAL scripts please see Introduction to Eval Scripts.
Required arguments
YES | SYNC | NO
Set the debugging mode:
YES: Enable non-blocking asynchronous debugging of Lua scripts (changes are discarded).SYNC: Enable blocking synchronous debugging of Lua scripts (saves changes to data).NO: Disable Lua script debug mode. Subsequent scripts run normally, without LDB.
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ❌ Standard |
❌ Standard |
Return information
OK.