Resty Repl is a powerful alternative to the standard luajit shell ispired by pry. It is written from scratch to provide a number of advanced features, including:
Full read/write access to locals, upvalues and global variables
Pretty print for objects
A Powerful and flexible command system
Ability to view and replay history
Ability to see a context and source of the place in code from where repl was started
Runtime invocation (use Resty Repl as a developer console or debugger)
Tab completion
Simple and easy way to debug lua running in the nginx (openresty)
Runtime invocation
First install luarock
luarocks install lua-resty-repl
Then just drop this snippet anywhere in your code:
require('resty.repl').start()
or run as cli:
resty-repl
Openresty debugger
But what makes it really nice is that now you can debug your openresty code right from running nginx!
请发表评论