luaopenrestyzerobrane

debug openresty with zerobrane


I've followed this tutorial to setting up Zerobrane IDE for debugging openresty:
http://notebook.kulchenko.com/zerobrane/debugging-openresty-nginx-lua-scripts-with-zerobrane-studio.

I installed openresty 1.19.3.1 from a brew formula, and lua scripts are working.

Double checked everything with zerobrane, the error i got:

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.

What should i check? This is the conf i have on macos, but i got the same error on a 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;;';

Solution

  • You don't say what version of ZeroBrane Studio you are using, but you'll need to use the latest one from the master branch in the repository, as there have been several openresty-related fixes applied to the debugger and merged recently .