Redis 調試工具:redis-lua-debugger

jopen 9年前發布 | 29K 次閱讀 Redis NoSQL數據庫 redis-lua-debugger

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 therldchannel.

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

項目主頁:http://www.baiduhome.net/lib/view/home/1420290935859

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!