I followed the steps in the website. snippet of my nginx conf
http {
underscores_in_headers on;
lua_package_path '/opt/luapoc/lua/?.lua;/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;;';
init_by_lua_block{
num = require("numbers")
data = num.getrandom()
if data then
ngx.log(ngx.DEBUG, "data is" .. data)
end
}
numbers.lua
require('mobdebug').start("192.168.1.155")
local M={}
function M.getrandom()
print("random function called") -- I put a break point here.
return math.random()
end
return M
I took my IP address my ifconfg inetaddress.
I went to ZBS and set the project directory from numbers file. Then started the debug by Project -> Start debugger server.
Eventhough I gave the IP address in the require('mobdebug').start("192.168.1.155") it is staring the debug server on local host.
I am starting the nginx and expecting the flow stop at the break point I put at numbers.lua but its not.
Any idea was what's causing the ZBS to not receive debug signal?