Redis Lua debugging with ZeroBrane Studio

Redis is a popular open-source in-memory datastore that provides Lua scripting among its other interesting features. When I first looked into getting the debugging of Redis Lua scripts to work with ZeroBrane Studio, I wasn't able to accomplish much as the debugger used in the IDE relies on the debug library, which is not available from the Redis sandbox that runs Lua scripts.

This has changed when Salvatore Sanfilippo implemented a debugger for debugging Lua scripts running by Redis. It supports stepping through the script, setting breakpoints, inspect variables, and other functions you'd expect from a debugger. It accepts commands over the same protocol as Redis itself and provides command-line interface to work with.

Availability of this debugger in Redis made possible to create a package in ZeroBrane Studio, that would act as a proxy and forward requests to the debugger, thus enabling full access to debugging features in the IDE.

After being contacted by Itamar Haber from RedisLabs, we quickly put together a plugin for ZeroBrane Studio that you can get from the plugin repository (make sure you use ZeroBrane Studio v1.10 or later).

Itamar also put together a post with detailed instructions and a tutorial on how this integration works for debugging Redis Lua scripts with ZeroBrane Studio. Leave a comment or send me an email if you run across an issue with the integration package or have suggestions on what can be improved.

You should get a copy of my slick ZeroBrane Studio IDE and follow me on twitter here.

Leave a comment

what will you say?


I am Paul Kulchenko.
I live in Kirkland, WA with my wife and three kids.
I do consulting as a software developer.
I study robotics and artificial intelligence.
I write books and open-source software.
I teach introductory computer science.
I develop a slick Lua IDE and debugger.