lua debugger> help Redis Lua debugger help: [h]elp Show this help. [s]tep Run current line and stop again. [n]ext Alias for step. [c]continue Run till next breakpoint. [l]list List source code around current line. [l]list [line] List source code around [line]. ...
但是如果你使用的是redis cluster, 当你执行debug后, 大概率会看到如下内容
1 2 3 4 5 6 7
Lua debugging session started, please use: quit -- End the session. restart -- Restart the script in debug mode again. help -- Show Lua script debugging commands.
MOVED 6918 127.0.0.1:6001 ...
通常你还会看到lua脚本的输出,但是却无法设置任何debug或者断点
即使你输入help, 也只是会看到如下报错, 这种情况下所有的debug命令都无法使用
1 2
lua debugger> help ERR unknown command `help`, with args beginning with:
lua debugger> get somekey MOVED 6918 127.0.0.1:6001
重新连接后即可看到正常输出
1 2 3 4 5 6 7 8
Lua debugging session started, please use: quit -- End the session. restart -- Restart the script in debug mode again. help -- Show Lua script debugging commands.
* Stopped at 1, stop reason = step over -> 1 local expirePTTL = redis.call('PTTL', KEYS[1]) lua debugger>