使用 Zerobrane 调试 Openresty

我按照这篇教程设置 Zerobrane IDE 来调试 Openresty

http://notebook.kulchenko.com/zerobrane/debugging-openresty-nginx-lua-scripts-with-zerobrane-studio.

我从 brew formula 安装了 openresty 1.19.3.1,lua 脚本可以工作。

在 Zerobrane 中检查了一切,我得到了这个错误:

Debugger server started at vgh.local:8172.
Can't start debugging for '/usr/local/Cellar/openresty/1.19.3.1_1/nginx/lua/content.lua'. Compilation error:
Debugger connection closed
Debugging session completed (traced 0 instructions).
Refused a request to start a new debugging session as there is one in progress already.

我应该检查什么? 这是在 macOS 上的配置,但是我在 Linux(Ubuntu 20.10)上遇到了相同的错误:

lua_package_path '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/?/?.lua;/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/?.lua;;';
lua_package_cpath '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/?.dylib;;';
点赞
用户1442917
用户1442917

你没有说明你在使用哪个版本的 ZeroBrane Studio,但你需要从 仓库 的主分支中使用最新的版本,因为已经对调试器进行了几个与 openresty 相关的修复,并在最近进行了合并

2020-12-09 22:21:47