Shell script debugger4/6/2023 ![]() help - this command is passed to the Redis Lua debugger, that will print a list of commands like the following:.So a normal debugging cycle involves modifying the script after some debugging, and calling restart in order to start debugging again with the new script changes. restart - the debugging session will restart from scratch, reloading the new version of the script from the file.Moreover the command will exit from redis-cli. It's like removing all the breakpoints and using the continue debugging command. quit - this will terminate the debugging session.The only commands which are not passed to the Redis debugger are: You'll enter a special mode where redis-cli no longer accepts its normalĬommands, but instead prints a help screen and passes the unmodified debugging redis-cli -ldb -eval /tmp/a mykey somekey, arg1 arg2 Note that with the -eval option of redis-cli you can pass key names and arguments to the script, separated by a comma, like in the following example. Let's assume you are editing your Redis Lua script located at /tmp/a. To start a new debugging session using redis-cli do the following:Ĭreate your script in some file with your preferred editor. Important Note: please make sure to avoid debugging Lua scripts using your Redis production server.Īlso note that using the synchronous debugging mode (which is NOT the default) results in the Redis server blocking for all the time the debugging session lasts. Infinite loops and long execution detection, which simulates a breakpoint.Ī simple way to get started with the Lua debugger is to watch this video.Pretty printing of Redis and Lua values.Tracing of Redis commands executed by the script.Support from logging the debugged script into the debugger console.Support for static and dynamic breakpoints.In this mode the server blocks for the time the debugging session is active. An alternative synchronous (non forked) debugging model is available on demand, so that changes to the dataset can be retained.This also means that changes are rolled back after the script debugging session finished, so that's possible to restart a new debugging session again, using exactly the same Redis data set as the previous debugging session. It means that while the Redis Lua script is being debugged, the server does not block and is usable for development or in order to execute multiple debugging sessions in parallel. By default every new debugging session is a forked session. ![]() However other clients can be developed by following the simple protocol implemented by the server. The Redis server acts as the debugging server, while the default client is redis-cli. It uses a server-client model, so it's a remote debugger.The Redis Lua debugger, codenamed LDB, has the following important features: Used in order to make the task of writing complex Redis scripts much simpler. Starting with version 3.2 Redis includes a complete Lua debugger, that can be Out-of-order / backfilled ingestion performance considerations.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |