OpenResty 世界中常用的调试工具,
比如gdb、valgrind、sysetmtap和Mozilla rr ,也可以和 resty 一起配合使用,方便你平时的开发和测试。
它们分别对应着 resty 不同的指令,内部的实现其实很简单,就是多套了一层命令行调用。
我们以 valgrind 为例:
$ resty --valgrind -e "ngx.say('hello world'); "
ERROR: failed to run command "valgrind /usr/local/Cellar/openresty/1.13.6.2/nginx/sbin/nginx -p /tmp/resty_hTFRsFBhVl/ -c conf/nginx.conf": No such file or directory