redis-lua-debugger -


MIT
Linux
Lua

软件简介

rld 是一个非交互的调试工具,用于调试 Redis 的 Lua
脚本,这里有篇详细介绍的文章

rld 特性包括:

  • 易于安装,只有 6kB

  • 可打印输出到本地和远端

  • 跟踪执行的代码行

  • 先进的数值变化的自动监控机制报告

  • 报告函数调用、返回和参数可进行实时检查

基本使用:

  1. Load rld.lua to Redis once (e.g. redis-cli --eval rld.lua).

  2. Add this line at the beginning of your Lua script: rld.start().

  3. Run your code as usual (e.g. redis-cli --eval prog.lua).

  4. View rld’s output in Redis’ log file or by subscribing to the rld channel.

API

  • rld.start() - starts the debugger

  • rld.stop() - stops the debugger

  • rld.troff() / rld.tron() - toggles tracing off/on

  • rld.options - debugger options, see source for details