首页 > 解决方案 > 使用 zerobrane 调试 openresty

问题描述

我已按照本教程设置Zerobrane IDE以调试openresty
http ://notebook.kulchenko.com/zerobrane/debugging-openresty-nginx-lua-scripts-with-zerobrane-studio 。

我从 brew 公式安装了 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;;';

标签: luaopenrestyzerobrane

解决方案


您没有说您使用的是什么版本的 ZeroBrane Studio,但您需要使用存储库中 master 分支中的最新版本,因为最近有几个与 openresty 相关的修复程序应用于调试器合并


推荐阅读